@su-sws/synthetic-web-team 0.2.6 → 0.2.8
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 +6 -0
- package/README.md +112 -10
- package/package.json +3 -2
- package/packages/cli/bin/sws.mjs +175 -19
- package/packages/cli/src/acknowledged.mjs +6 -1
- package/packages/cli/src/brief.mjs +393 -0
- package/packages/cli/src/github.mjs +61 -10
- package/packages/cli/src/preflight.mjs +1 -1
- package/packages/cli/src/prior-art.mjs +329 -0
- package/packages/cli/src/report.mjs +21 -2
- package/packages/wizard/bin/wizard.mjs +299 -12
- package/packages/wizard/src/detect.mjs +111 -1
- package/packages/wizard/src/emit.mjs +130 -9
- package/skills/role-backend-developer/SKILL.md +5 -2
- package/skills/role-compliance-officer/SKILL.md +1 -1
- package/skills/role-devops/SKILL.md +11 -7
- package/skills/role-fullstack-developer/SKILL.md +5 -3
- package/skills/role-information-architect/SKILL.md +1 -1
- package/skills/role-infrastructure-architect/SKILL.md +3 -3
- package/skills/role-qa-engineer/SKILL.md +5 -3
- package/skills/role-ux-designer/SKILL.md +1 -1
- package/skills/sws-compliance-check/SKILL.md +1 -1
- package/skills/sws-diverge/SKILL.md +2 -2
- package/skills/sws-github/SKILL.md +2 -0
- package/skills/sws-install/SKILL.md +1 -1
- package/skills/sws-netlify/SKILL.md +2 -0
- package/skills/sws-preflight/SKILL.md +5 -0
- package/skills/sws-vercel/SKILL.md +2 -0
- package/standards/hosting/github-pages.yml +1 -0
- package/standards/hosting/netlify.yml +1 -0
- package/standards/hosting/vercel.yml +1 -0
|
@@ -74,10 +74,28 @@ const LEGACY_POINTER_COMMENT = `<!--
|
|
|
74
74
|
// copies is the floor rather than a design flaw -- see docs/skill-paths.md.
|
|
75
75
|
export const SKILL_TARGETS = ['.agents/skills', '.claude/skills'];
|
|
76
76
|
|
|
77
|
+
// HOW EACH TOOL GETS ITS SKILLS, where that is not a copy written here.
|
|
78
|
+
//
|
|
79
|
+
// The one entry so far: `{ 'claude-code': 'plugin' }`. The same skills ship as
|
|
80
|
+
// a Claude Code plugin, and with both in place Claude Code lists every skill
|
|
81
|
+
// twice, from two update channels. Someone who chose the plugin says so with
|
|
82
|
+
// `install --claude-plugin`, and from then on .claude/skills is not planned.
|
|
83
|
+
// Null, the default, means a copy at every target, which is what every release
|
|
84
|
+
// before this did and what everyone who never passes the flag still gets.
|
|
85
|
+
//
|
|
86
|
+
// .agents/skills is never dropped: it is what every other tool reads.
|
|
87
|
+
export const CLAUDE_SKILLS = '.claude/skills';
|
|
88
|
+
export const PLUGIN_DELIVERY = { 'claude-code': 'plugin' };
|
|
89
|
+
const viaPlugin = (delivery) => delivery?.['claude-code'] === 'plugin';
|
|
90
|
+
|
|
91
|
+
export function skillTargets(delivery = null) {
|
|
92
|
+
return SKILL_TARGETS.filter((t) => !(t === CLAUDE_SKILLS && viaPlugin(delivery)));
|
|
93
|
+
}
|
|
94
|
+
|
|
77
95
|
const skillNames = (source) => readdirSync(join(source, 'skills'))
|
|
78
96
|
.filter((d) => existsSync(join(source, 'skills', d, 'SKILL.md')));
|
|
79
97
|
|
|
80
|
-
export function plan({ root, source, editors, answers, tier, scope = 'project', layout = 'root' }) {
|
|
98
|
+
export function plan({ root, source, editors, answers, tier, scope = 'project', layout = 'root', delivery = null }) {
|
|
81
99
|
const files = [];
|
|
82
100
|
const add = (path, contents, note, opts = {}) => files.push({ path, contents, note, ...opts });
|
|
83
101
|
|
|
@@ -90,7 +108,7 @@ export function plan({ root, source, editors, answers, tier, scope = 'project',
|
|
|
90
108
|
//
|
|
91
109
|
// Nothing per-site is emitted here, because at this point there is no site.
|
|
92
110
|
if (scope === 'user') {
|
|
93
|
-
for (const target of
|
|
111
|
+
for (const target of skillTargets(delivery)) {
|
|
94
112
|
for (const name of skillNames(source)) {
|
|
95
113
|
add(`${target}/${name}/SKILL.md`,
|
|
96
114
|
readFileSync(join(source, 'skills', name, 'SKILL.md'), 'utf8'), null);
|
|
@@ -184,8 +202,12 @@ export function plan({ root, source, editors, answers, tier, scope = 'project',
|
|
|
184
202
|
// The server is a SECOND entry point, never a requirement: everything it
|
|
185
203
|
// exposes is also a file in .sws/standards/ that the agent can read directly.
|
|
186
204
|
// If the client cannot start it, nothing else stops working.
|
|
187
|
-
|
|
188
|
-
|
|
205
|
+
//
|
|
206
|
+
// Exported so a check can hold the Claude Code plugin's own `mcpServers` entry
|
|
207
|
+
// to exactly this. Claude Code connects one server when a project's .mcp.json
|
|
208
|
+
// and the plugin name the same command, and two when they drift apart.
|
|
209
|
+
export const SERVER_NAME = 'sws';
|
|
210
|
+
export const SERVER = { command: 'npx', args: ['-y', '@su-sws/synthetic-web-team-mcp'] };
|
|
189
211
|
|
|
190
212
|
const MD_POINTER = ['<!-- BEGIN:sws-pointer -->', '<!-- END:sws-pointer -->'];
|
|
191
213
|
const TOML_POINTER = ['# BEGIN:sws-pointer', '# END:sws-pointer'];
|
|
@@ -455,6 +477,14 @@ const ACKNOWLEDGED_TEMPLATE = `# Accepted risks.
|
|
|
455
477
|
* moved A file an earlier version wrote somewhere else, `standards/` at
|
|
456
478
|
* the root, now under .sws/. Listed separately in the result.
|
|
457
479
|
*
|
|
480
|
+
* And one at user scope only, when a tool's skills come from somewhere else:
|
|
481
|
+
*
|
|
482
|
+
* retired A copy this tool wrote into a skills directory it no longer
|
|
483
|
+
* plans, because `delivery` says that tool gets its skills another
|
|
484
|
+
* way. Deleted only when the record lists it and it still hashes
|
|
485
|
+
* to what was written; an edited one stays, as a conflict. See
|
|
486
|
+
* retire().
|
|
487
|
+
*
|
|
458
488
|
* Comparison is by content, never mtime: re-running the same version must be
|
|
459
489
|
* `unchanged` even though the source files have newer timestamps.
|
|
460
490
|
*
|
|
@@ -462,7 +492,7 @@ const ACKNOWLEDGED_TEMPLATE = `# Accepted risks.
|
|
|
462
492
|
* and writing the import through it would replace the contract with a line that
|
|
463
493
|
* imports itself.
|
|
464
494
|
*/
|
|
465
|
-
export function write(root, files, { force = false, version = null, scope = 'project', layout = 'root' } = {}) {
|
|
495
|
+
export function write(root, files, { force = false, version = null, scope = 'project', layout = 'root', delivery = null } = {}) {
|
|
466
496
|
const prev = readInstalled(root);
|
|
467
497
|
let planned = new Set(files.map((f) => f.path));
|
|
468
498
|
|
|
@@ -581,9 +611,18 @@ export function write(root, files, { force = false, version = null, scope = 'pro
|
|
|
581
611
|
results.push({ path: f.path, status, ...(reason ? { reason } : {}) });
|
|
582
612
|
}
|
|
583
613
|
|
|
614
|
+
// Copies in a skills directory that is no longer planned. Before the orphans
|
|
615
|
+
// are counted: a retired file is gone, so it is not one, and a kept one is a
|
|
616
|
+
// conflict, which is the louder of the two reports.
|
|
617
|
+
const retiring = scope === 'user'
|
|
618
|
+
? retire(root, prev, planned, delivery, { force })
|
|
619
|
+
: { retired: [], kept: [] };
|
|
620
|
+
const held = new Set(retiring.kept.map((k) => k.path));
|
|
621
|
+
|
|
584
622
|
// A moved file's old path no longer exists, so it drops out of the record
|
|
585
623
|
// here rather than reporting as an orphan.
|
|
586
|
-
const orphans = Object.keys(prev?.files ?? {})
|
|
624
|
+
const orphans = Object.keys(prev?.files ?? {})
|
|
625
|
+
.filter((x) => !planned.has(x) && !held.has(x) && existsSync(join(root, x)));
|
|
587
626
|
|
|
588
627
|
// Keep orphans in the record while the file still exists, so they are reported
|
|
589
628
|
// on EVERY run rather than once. A one-shot warning is easy to miss -- an agent
|
|
@@ -593,7 +632,12 @@ export function write(root, files, { force = false, version = null, scope = 'pro
|
|
|
593
632
|
// when it has been seen once.
|
|
594
633
|
for (const x of orphans) nextHashes[x] = prev.files[x];
|
|
595
634
|
|
|
596
|
-
|
|
635
|
+
// A copy that was kept stays in the record under the hash of what we wrote,
|
|
636
|
+
// for the reason a conflict does: it is reported on every run, `--remove`
|
|
637
|
+
// still knows it was ours, and switching back still sees it as edited.
|
|
638
|
+
for (const x of held) nextHashes[x] = prev.files[x];
|
|
639
|
+
|
|
640
|
+
writeInstalled(root, { version, files: nextHashes, scope, layout, delivery });
|
|
597
641
|
|
|
598
642
|
const count = (s) => results.filter((r) => r.status === s).length;
|
|
599
643
|
return {
|
|
@@ -601,16 +645,79 @@ export function write(root, files, { force = false, version = null, scope = 'pro
|
|
|
601
645
|
orphans,
|
|
602
646
|
moved,
|
|
603
647
|
deferred,
|
|
648
|
+
retired: retiring.retired,
|
|
649
|
+
kept: retiring.kept,
|
|
604
650
|
previousVersion: prev?.version ?? null,
|
|
605
651
|
created: count('created'),
|
|
606
652
|
updated: count('updated'),
|
|
607
653
|
unchanged: count('unchanged'),
|
|
608
654
|
preserved: count('preserved'),
|
|
609
655
|
merged: count('merged'),
|
|
610
|
-
conflicts: results.filter((r) => r.status === 'conflict').map((r) => r.path),
|
|
656
|
+
conflicts: [...results.filter((r) => r.status === 'conflict').map((r) => r.path), ...held],
|
|
611
657
|
};
|
|
612
658
|
}
|
|
613
659
|
|
|
660
|
+
// What a run would retire, and what it would keep, for a dry run and for the
|
|
661
|
+
// list shown before anything is written. Reads, never writes.
|
|
662
|
+
export function plannedRetire(root, files, { delivery = null, force = false } = {}) {
|
|
663
|
+
return retire(root, readInstalled(root), new Set(files.map((f) => f.path)), delivery, { dryRun: true, force });
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Take back the copies this tool wrote into a skills directory it no longer
|
|
668
|
+
* writes, because the tool that reads it gets its skills another way.
|
|
669
|
+
*
|
|
670
|
+
* The case: `install` put 31 skills in ~/.claude/skills, and the person then
|
|
671
|
+
* installed the Claude Code plugin, which carries the same 31. Leaving both
|
|
672
|
+
* means every skill is listed twice and the home copy wins a bare reference,
|
|
673
|
+
* so choosing the plugin has to be able to remove the copies. `--remove`
|
|
674
|
+
* cannot do it: it takes ~/.agents/skills too, which other tools still read.
|
|
675
|
+
*
|
|
676
|
+
* Driven by the install record only, the rule `remove()` and `migrate()`
|
|
677
|
+
* follow, and narrower than either:
|
|
678
|
+
*
|
|
679
|
+
* - only a path the record lists, and only one of the exact shape a user
|
|
680
|
+
* install writes, `<target>/<name>/SKILL.md`. A home skills directory
|
|
681
|
+
* holds hundreds of other people's skills. None of them is in the record,
|
|
682
|
+
* so none of them is ever looked at.
|
|
683
|
+
* - only while it still hashes to what was written. An edited copy is
|
|
684
|
+
* somebody's work: it stays, and is reported as a conflict on every run
|
|
685
|
+
* until it is dealt with. `force` removes it, as it does for `--remove`.
|
|
686
|
+
* - never a symbolic link, with or without `force`.
|
|
687
|
+
* - a file already gone is simply dropped from the record.
|
|
688
|
+
*
|
|
689
|
+
* Emptied directories are pruned, so `.claude/skills/<name>/` goes with its
|
|
690
|
+
* SKILL.md and `.claude/skills/` itself survives while anything else is in it.
|
|
691
|
+
*/
|
|
692
|
+
function retire(root, prev, planned, delivery, { dryRun = false, force = false } = {}) {
|
|
693
|
+
const retired = [];
|
|
694
|
+
const kept = [];
|
|
695
|
+
const dropped = SKILL_TARGETS.filter((t) => !skillTargets(delivery).includes(t));
|
|
696
|
+
if (!dropped.length) return { retired, kept };
|
|
697
|
+
|
|
698
|
+
const ours = (rel) => dropped.some((t) => {
|
|
699
|
+
if (!rel.startsWith(`${t}/`)) return false;
|
|
700
|
+
const [name, file, ...more] = rel.slice(t.length + 1).split('/');
|
|
701
|
+
return file === 'SKILL.md' && !more.length && Boolean(name) && name !== '.' && name !== '..';
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
for (const [rel, recorded] of Object.entries(prev?.files ?? {})) {
|
|
705
|
+
if (planned.has(rel) || !ours(rel)) continue;
|
|
706
|
+
const p = join(root, rel);
|
|
707
|
+
const st = lstatSync(p, { throwIfNoEntry: false });
|
|
708
|
+
if (!st) continue;
|
|
709
|
+
if (st.isSymbolicLink()) { kept.push({ path: rel, reason: 'symlink' }); continue; }
|
|
710
|
+
if (!st.isFile() || (!force && hash(readFileSync(p, 'utf8')) !== recorded)) {
|
|
711
|
+
kept.push({ path: rel, reason: 'edited' });
|
|
712
|
+
continue;
|
|
713
|
+
}
|
|
714
|
+
if (!dryRun) rmSync(p);
|
|
715
|
+
retired.push(rel);
|
|
716
|
+
}
|
|
717
|
+
if (!dryRun) pruneEmpty(root, retired);
|
|
718
|
+
return { retired, kept };
|
|
719
|
+
}
|
|
720
|
+
|
|
614
721
|
// What a re-run would move, or why it would wait, for a dry run, which writes
|
|
615
722
|
// nothing.
|
|
616
723
|
export function plannedMigration(root, files, { force = false } = {}) {
|
|
@@ -1055,7 +1162,13 @@ export function readInstalled(root) {
|
|
|
1055
1162
|
}
|
|
1056
1163
|
}
|
|
1057
1164
|
|
|
1058
|
-
|
|
1165
|
+
// The delivery choice the record holds, or null. Anything this version does not
|
|
1166
|
+
// recognise reads as null, the default, rather than as a choice nobody made.
|
|
1167
|
+
export function readDelivery(root) {
|
|
1168
|
+
return viaPlugin(readInstalled(root)?.delivery) ? { ...PLUGIN_DELIVERY } : null;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
function writeInstalled(root, { version, files, scope = 'project', layout = 'root', delivery = null }) {
|
|
1059
1172
|
// The advice differs by scope, and getting it wrong matters: "commit this" is
|
|
1060
1173
|
// right in a repository and nonsense in a home directory.
|
|
1061
1174
|
const advice = scope === 'user'
|
|
@@ -1072,6 +1185,10 @@ function writeInstalled(root, { version, files, scope = 'project', layout = 'roo
|
|
|
1072
1185
|
scope,
|
|
1073
1186
|
// Only when it is not the default, so a root install's record is unchanged.
|
|
1074
1187
|
...(layout === 'contained' ? { layout } : {}),
|
|
1188
|
+
// The same rule, at user scope: present only once someone has chosen the
|
|
1189
|
+
// plugin, so a plain `install` afterwards keeps the choice instead of
|
|
1190
|
+
// writing .claude/skills back.
|
|
1191
|
+
...(scope === 'user' && viaPlugin(delivery) ? { delivery: { ...PLUGIN_DELIVERY } } : {}),
|
|
1075
1192
|
version,
|
|
1076
1193
|
at: new Date().toISOString(),
|
|
1077
1194
|
files,
|
|
@@ -1124,6 +1241,10 @@ export function remove(root, { dryRun = false, force = false } = {}) {
|
|
|
1124
1241
|
writeInstalled(root, {
|
|
1125
1242
|
version: prev.version ?? null,
|
|
1126
1243
|
scope: prev.scope ?? 'project',
|
|
1244
|
+
// Carried, so the files that stayed are still read under the choice
|
|
1245
|
+
// they were kept under. With nothing kept the record goes, and the
|
|
1246
|
+
// choice with it: an uninstall leaves no settings behind.
|
|
1247
|
+
delivery: prev.delivery,
|
|
1127
1248
|
files: Object.fromEntries(kept.map((k) => [k, prev.files[k]])),
|
|
1128
1249
|
});
|
|
1129
1250
|
} else if (existsSync(recordPath)) {
|
|
@@ -15,8 +15,11 @@ compliance tier, an attack surface, and something to patch forever.
|
|
|
15
15
|
|
|
16
16
|
Common requirements that do **not** need one:
|
|
17
17
|
|
|
18
|
-
- **Content that changes often.**
|
|
19
|
-
site stays static
|
|
18
|
+
- **Content that changes often.** Edit it in the repo: a commit to `main` from
|
|
19
|
+
the GitHub web UI rebuilds the site, and it stays static. A CMS with a
|
|
20
|
+
webhook-triggered rebuild is out of scope for this package right now, not
|
|
21
|
+
forbidden (`standards/scope.md`). If the unit needs one, say so rather than
|
|
22
|
+
wiring one up.
|
|
20
23
|
- **Search.** Algolia DocSearch is hosted and free for public education content.
|
|
21
24
|
- **A contact form.** A hosted form service, or a Netlify function, beats standing
|
|
22
25
|
up an application.
|
|
@@ -12,7 +12,7 @@ procurement review depth.
|
|
|
12
12
|
|
|
13
13
|
## What already works
|
|
14
14
|
|
|
15
|
-
- **
|
|
15
|
+
- **The acceptance criteria** for `astro-static`, machine-checkable, in
|
|
16
16
|
`standards/recipes/astro-static/acceptance.yml`.
|
|
17
17
|
- **A risk acceptance register** at `.sws/acknowledged.yml`, with reason,
|
|
18
18
|
attribution, date, and `review_by`. This is deliberately the same shape a
|
|
@@ -74,7 +74,8 @@ report, because it implies oversight that is not happening.
|
|
|
74
74
|
|
|
75
75
|
| Trigger | Destination |
|
|
76
76
|
|---|---|
|
|
77
|
-
| Push to
|
|
77
|
+
| Push to the default branch | Job summary via `$GITHUB_STEP_SUMMARY`, plus one long-lived **"Site health" issue updated in place**, plus the HTML report as an artifact |
|
|
78
|
+
| Push to any other branch | Job summary only, with a line saying why the issue was left alone, plus the artifact |
|
|
78
79
|
| Pull request | Annotations on changed lines, one collapsible comment with score and trend, plus the artifact |
|
|
79
80
|
|
|
80
81
|
The job summary needs no permissions and renders formatted markdown on the run
|
|
@@ -215,9 +216,12 @@ sunset plan on any campaign or event site.
|
|
|
215
216
|
## A note on making git invisible
|
|
216
217
|
|
|
217
218
|
For units with non-technical editors, the two paths that work are the **GitHub
|
|
218
|
-
web UI** (edit, commit to `main`, site updates) and
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this
|
|
219
|
+
web UI** (edit, commit to `main`, site updates) and **Stanford Sites**, where
|
|
220
|
+
someone else maintains the site. A **CMS** where publishing fires a webhook and
|
|
221
|
+
the editor never touches GitHub at all is out of scope for this package right
|
|
222
|
+
now, not forbidden (`standards/scope.md`).
|
|
223
|
+
|
|
224
|
+
If the site has content editors who are not developers, raise this early, and if
|
|
225
|
+
they need a CMS, say plainly that this package does not cover it yet. It changes
|
|
226
|
+
who can maintain the site, which outlasts every technical decision in this
|
|
227
|
+
document.
|
|
@@ -9,8 +9,10 @@ description: End-to-end development across front end and back end on a Stanford
|
|
|
9
9
|
in v1 and covers the client layer completely. The server-side half is
|
|
10
10
|
`role-backend-developer`, which is a stub until v2.
|
|
11
11
|
|
|
12
|
-
For most SWS unit sites the front-end role
|
|
13
|
-
there and only come back here if there is
|
|
12
|
+
For most SWS unit sites the front-end role is the whole job, with content
|
|
13
|
+
authored in the repo, so start there and only come back here if there is
|
|
14
|
+
genuinely server-side work. A CMS is out of scope for this package right now,
|
|
15
|
+
not forbidden (`standards/scope.md`).
|
|
14
16
|
|
|
15
17
|
## Use the specific roles instead
|
|
16
18
|
|
|
@@ -48,7 +50,7 @@ scanning. A static site has almost none of this. A Node service has a lot.
|
|
|
48
50
|
## Practical advice for one person owning everything
|
|
49
51
|
|
|
50
52
|
Keep the surface small on purpose. The most maintainable Stanford site is a static
|
|
51
|
-
build from
|
|
53
|
+
build from content in the repo, deployed on push, with no server you own. Every deviation from
|
|
52
54
|
that should be a decision you can defend in eighteen months when you have
|
|
53
55
|
forgotten the context.
|
|
54
56
|
|
|
@@ -108,7 +108,7 @@ unit loses years of accumulated search equity in an afternoon.
|
|
|
108
108
|
On GitHub Pages, redirects are a real constraint: static hosting has no
|
|
109
109
|
server-side redirect layer, so you get meta-refresh or JS shims, both of which
|
|
110
110
|
are worse for accessibility and search. If a migration involves substantial
|
|
111
|
-
redirects, that is a reason to deploy to Netlify. Say so early rather than
|
|
111
|
+
redirects, that is a reason to deploy to Netlify or Vercel. Say so early rather than
|
|
112
112
|
discovering it at launch.
|
|
113
113
|
|
|
114
114
|
## Search, when the site needs it
|
|
@@ -6,7 +6,7 @@ description: Hosting and infrastructure decisions for a Stanford site. Use when
|
|
|
6
6
|
# Infrastructure
|
|
7
7
|
|
|
8
8
|
**Status: stub. Full role lands in v2 with Drupal and Acquia.** v1 covers GitHub
|
|
9
|
-
Pages and
|
|
9
|
+
Pages, Netlify, and Vercel, all of which are in `sws-deploy`.
|
|
10
10
|
|
|
11
11
|
## The hosting decision, honestly
|
|
12
12
|
|
|
@@ -16,8 +16,8 @@ Ordered by how much you take on:
|
|
|
16
16
|
|---|---|---|
|
|
17
17
|
| **Stanford Sites** | Content only | A unit with no developer. Free, already compliant, someone else patches it. Recommend this more often than feels natural |
|
|
18
18
|
| **GitHub Pages** | Build and content | Static site, one environment, no server-side needs. Free |
|
|
19
|
-
| **Netlify** | Build, functions, config |
|
|
20
|
-
| **Vercel** | Same as Netlify |
|
|
19
|
+
| **Netlify** | Build, functions, config | One of the two hosts SWS runs, in the Storyblok family. Functions, blobs, edge functions, CSP nonces, Vault-backed env vars, per-PR previews |
|
|
20
|
+
| **Vercel** | Same as Netlify | The other host SWS runs, in the decoupled Drupal family. Neither is the house default: start from whichever the unit already administers |
|
|
21
21
|
| **Acquia** | Drupal application | Enterprise Drupal. v2 territory |
|
|
22
22
|
| **Self-hosted** | Everything, including MinSec server obligations | Almost never the right answer for a website |
|
|
23
23
|
|
|
@@ -17,9 +17,11 @@ person.
|
|
|
17
17
|
real mouse and a real Tab key, because axe reads a static snapshot and a
|
|
18
18
|
colour-only hover state is invisible to it
|
|
19
19
|
- Build verification
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
- The acceptance criteria in the recipe's `acceptance.yml`
|
|
21
|
+
|
|
22
|
+
Not running yet: link checking, a post-deploy sweep, and the recipe canary that
|
|
23
|
+
generates a project from scratch and checks it. The canary is deliberately
|
|
24
|
+
deferred.
|
|
23
25
|
|
|
24
26
|
Playwright is the forward default. Three SWS repos run Cypress with e2e and
|
|
25
27
|
component testing (`adapt-stanford-homesite`, `adapt-directory`, `ccc-bulletin`),
|
|
@@ -35,7 +35,7 @@ Every page, in this order:
|
|
|
35
35
|
|
|
36
36
|
1. Skip navigation link. The only thing permitted above the Identity Bar.
|
|
37
37
|
2. **Stanford Identity Bar.** Nothing above it but the skip link, and it has a
|
|
38
|
-
**fixed height** — roughly
|
|
38
|
+
**fixed height** — roughly 31px, from `pt-5 pb-1` and a `text-20` logo. Use
|
|
39
39
|
`standards/fragments/identity-bar.yml` verbatim rather than styling your own;
|
|
40
40
|
`logo` is the correct font mechanism, not `font-serif`. **The Stanford
|
|
41
41
|
ligature font must be loaded** — Decanter 8 ships no font assets, so without
|
|
@@ -123,7 +123,7 @@ workaround. Write it to `.sws/acknowledged.yml`:
|
|
|
123
123
|
- check: a11y.contrast
|
|
124
124
|
path: src/components/Legacy.astro
|
|
125
125
|
reason: Vendor widget; contrast fix requested from vendor 2026-08-04
|
|
126
|
-
accepted_by:
|
|
126
|
+
accepted_by: you@stanford.edu
|
|
127
127
|
date: 2026-08-11
|
|
128
128
|
review_by: 2026-11-10
|
|
129
129
|
```
|
|
@@ -48,7 +48,7 @@ divergences:
|
|
|
48
48
|
cost_accepted: >
|
|
49
49
|
Static export forfeits redirects, headers, and image optimization
|
|
50
50
|
date: 2026-08-11
|
|
51
|
-
by:
|
|
51
|
+
by: you@stanford.edu
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
The record is what lets the next person understand the project. When the choice
|
|
@@ -62,7 +62,7 @@ from the nag to a "Divergences" section, with the reason beside it:
|
|
|
62
62
|
cost_accepted: A licence to renew, and a token every install needs
|
|
63
63
|
checks: [security.no-fontawesome-pro]
|
|
64
64
|
date: 2026-11-09
|
|
65
|
-
by:
|
|
65
|
+
by: you@stanford.edu
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
`checks:` covers preferences only: criteria with `policy: patterns` or no
|
|
@@ -41,6 +41,8 @@ manager. Use the `sws-preflight` skill, or just:
|
|
|
41
41
|
npx sws preflight # then install what it names, then run it again
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
Run `npm install` first: unscoped `sws` on the registry is an unrelated package.
|
|
45
|
+
|
|
44
46
|
It reports what is missing and why it matters, and deliberately does not say how
|
|
45
47
|
to install it — that is yours, because you know the platform. **Re-run it after
|
|
46
48
|
installing.** An installer that exited 0 without putting the binary on `PATH` is
|
|
@@ -20,7 +20,7 @@ npx @su-sws/synthetic-web-team add . # a project that already exists
|
|
|
20
20
|
Run it in the repository root. **Pick deliberately:** `init` hands back a recipe
|
|
21
21
|
to follow afterwards, `add` assumes there is already a site and leaves the source
|
|
22
22
|
alone. There is no default — running with no command prints help and writes
|
|
23
|
-
nothing, so a wrong guess cannot put
|
|
23
|
+
nothing, so a wrong guess cannot put dozens of files in the wrong directory.
|
|
24
24
|
|
|
25
25
|
Every flag is optional. With a terminal attached each one interviews the person;
|
|
26
26
|
without one it runs to completion and reports.
|
|
@@ -40,6 +40,8 @@ the order, the questions, and the judgment.
|
|
|
40
40
|
npx sws preflight # then install what it names, then run it again
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
Run `npm install` first: unscoped `sws` on the registry is an unrelated package.
|
|
44
|
+
|
|
43
45
|
**The Netlify CLI is optional here**, unlike `gh` for GitHub Pages —
|
|
44
46
|
`standards/stack/requirements.yml` marks it `optional: true` because Netlify
|
|
45
47
|
deploys from its git integration, not from the CLI. Install it anyway for local
|
|
@@ -13,6 +13,11 @@ One command. It reads `standards/stack/requirements.yml`, probes for each tool,
|
|
|
13
13
|
and tells you what is missing and why it matters. Use `--format json` if you are
|
|
14
14
|
acting on the result programmatically.
|
|
15
15
|
|
|
16
|
+
**`npx sws` is this CLI only once the project's dependencies are installed.**
|
|
17
|
+
Unscoped `sws` on the public registry is an unrelated package, so run
|
|
18
|
+
`npm install` first. With no project on the machine yet, name the package:
|
|
19
|
+
`npx -p @su-sws/synthetic-web-team sws preflight`.
|
|
20
|
+
|
|
16
21
|
**It does not install anything, and it deliberately does not tell you how to.**
|
|
17
22
|
That part is yours: you know what platform you are on and what package manager
|
|
18
23
|
exists, and a hardcoded install matrix would be a guess about someone else's
|
|
@@ -39,6 +39,8 @@ the order, the questions, and the judgment.
|
|
|
39
39
|
npx sws preflight # then install what it names, then run it again
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
Run `npm install` first: unscoped `sws` on the registry is an unrelated package.
|
|
43
|
+
|
|
42
44
|
**The Vercel CLI is optional here**, same as Netlify's —
|
|
43
45
|
`standards/stack/requirements.yml` marks `vercel-cli` `optional: true` because
|
|
44
46
|
Vercel deploys from its git integration, not from the CLI. Install it anyway
|
|
@@ -130,6 +130,7 @@ provisioning:
|
|
|
130
130
|
# ---------------------------------------------------------------------------
|
|
131
131
|
prerequisite:
|
|
132
132
|
run: |
|
|
133
|
+
npm install # first: unscoped `sws` on the registry is an unrelated package
|
|
133
134
|
npx sws preflight # then install what it names, then run it again
|
|
134
135
|
needs: >
|
|
135
136
|
git and the gh CLI. Both appear in requirements.yml with their detection
|
|
@@ -138,6 +138,7 @@ gotchas:
|
|
|
138
138
|
provisioning:
|
|
139
139
|
prerequisite:
|
|
140
140
|
run: |
|
|
141
|
+
npm install # first: unscoped `sws` on the registry is an unrelated package
|
|
141
142
|
npx sws preflight # then install what it names, then run it again
|
|
142
143
|
needs: >
|
|
143
144
|
git, mandatory regardless of host (same reasoning as github-pages.yml).
|
|
@@ -172,6 +172,7 @@ gotchas:
|
|
|
172
172
|
provisioning:
|
|
173
173
|
prerequisite:
|
|
174
174
|
run: |
|
|
175
|
+
npm install # first: unscoped `sws` on the registry is an unrelated package
|
|
175
176
|
npx sws preflight # then install what it names, then run it again
|
|
176
177
|
needs: >
|
|
177
178
|
git, mandatory regardless of host. The Vercel CLI (`vercel-cli`, binary
|