@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.
@@ -19,6 +19,14 @@ page here.
19
19
  beyond `github-pages`.** Each of those silently converts push-to-main into a
20
20
  pull-request requirement. If a project already has them, leave them and report;
21
21
  someone may have added them deliberately.
22
+ - **No blocking hooks.** Not husky, lefthook, or a pre-commit or pre-push hook,
23
+ and no agent hook that can refuse (Claude Code `PreToolUse` or `Stop`). A check
24
+ that refuses a commit gets bypassed; a red check in CI gets looked at.
25
+ `sws check` reports hooks it finds, as advice. Existing ones stay unless the
26
+ team agrees to move them.
27
+ - **Nothing shared lives in `.claude/`.** Many teams git-ignore it, so a workflow
28
+ or `.mcp.json` that calls a script there works on one machine and breaks in CI.
29
+ Shared scripts go in `scripts/`.
22
30
  - **`.gitignore` covers `node_modules`, build output, `.sws/prior-art.local.yml`**
23
31
  (a local index that must never be committed) **and `.sws/axe-results.json`**
24
32
  (derived from a build; committing it lets a stale pass travel with the repo).
@@ -46,6 +54,19 @@ Full permissions block, Pages action versions, and the two gotchas
46
54
  (`upload-pages-artifact@v4` excludes dotfiles; subpath deploys need `base`) are in
47
55
  `sws-deploy`.
48
56
 
57
+ Beside `build` and `deploy`, a **`checks` job** runs lint, typecheck, tests, and
58
+ a check that fails on switched-off tests (`.only`, `.skip`, `.fixme`). The
59
+ deploy job does not `need` it, so a failure there is a red check on the commit
60
+ and never a held-back publish. The job is in `astro-static` step 8.
61
+
62
+ **Pull requests get two reviews before a person's**: Copilot
63
+ (`gh pr edit <pr> --add-reviewer @copilot`) and an agent running
64
+ `sws-code-review`, which reads the diff cold against SWS standards. Fix or answer
65
+ each thread from either and resolve it. Review again after fixes, at most twice
66
+ each. Threads a person started are theirs. If the Copilot request fails, its
67
+ review is not enabled for the repository; say so and carry on. Commands for
68
+ every step are in `sws-github`.
69
+
49
70
  ## The report has to reach a reader
50
71
 
51
72
  This is the part that gets designed wrong. A report nobody sees is worse than no
@@ -80,8 +101,10 @@ deploys with the site.
80
101
 
81
102
  ## Everything is advisory except one thing
82
103
 
83
- **The job succeeds regardless of findings.** A separate, small, fast secrets job
84
- is the only one allowed to fail.
104
+ **The build-and-deploy job succeeds regardless of findings.** Two others can go
105
+ red: the `checks` job, whose failure is the nag and holds nothing back, and a
106
+ separate, small, fast secrets job, which is the one thing in the system that
107
+ blocks.
85
108
 
86
109
  The secrets message must differ by context. On a pull request, blocking stops the
87
110
  leak from landing. On a push to `main` the commit is already in the remote's
@@ -165,3 +165,12 @@ hardcoded hex, a removed focus outline, a hover or focus state that is only a
165
165
  colour change, an island that did not need to be one, an image without
166
166
  dimensions, and a heading level chosen for its size. That list catches most of
167
167
  what actually goes wrong.
168
+
169
+ On a pull request, let two reviewers go first: Copilot (`gh pr edit <pr>
170
+ --add-reviewer @copilot`), and `sws-code-review` in a separate agent, which
171
+ checks this list among others. Fix or answer each of their threads and resolve
172
+ them, so the person reviewing after you sees only what is left. Answer from the
173
+ standards rather than adopting a suggestion that contradicts them: Copilot does
174
+ not know that the Global Footer is immutable or that Decanter's CSS wins on
175
+ tokens. Leave threads a person started for that person. The full steps, with
176
+ commands, are in `sws-github`.
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: sws-code-review
3
+ description: Review a pull request on a Stanford site as a second reviewer, alongside Copilot and before a person. Use when a pull request is opened or updated, when asked to review a diff or a branch, or when preparing a change for someone else to review. Reads the diff cold against SWS standards, posts findings as one comment-only review, and never blocks a merge.
4
+ ---
5
+
6
+ # Code review, by an agent that did not write the change
7
+
8
+ Copilot reviews every pull request (see `sws-github`), but it does not know SWS
9
+ policy, and one automated reviewer is a single point of failure. This is the
10
+ second review: aware of the standards, independent of the author, and done
11
+ before a person spends time on the change.
12
+
13
+ ## Independence is the point
14
+
15
+ An author reviewing their own change confirms what they meant to write. So:
16
+
17
+ - **If your tool can start a separate agent** (a subagent, a second session, a
18
+ background task), have it do the review. Give it the pull request number,
19
+ this skill, and where the standards are. **Do not give it your summary of the
20
+ change, your reasoning, or the list of things you already checked.** It reads
21
+ the diff cold, and its report comes back as findings, not as agreement.
22
+ - **If it cannot**, review after the work is finished, from the diff alone, as
23
+ if a stranger wrote it. Say in the review body that the author reviewed their
24
+ own change, so a person can weigh it accordingly.
25
+
26
+ Never present a self-review as an independent one.
27
+
28
+ ## What to read
29
+
30
+ ```bash
31
+ gh pr view <pr> --json title,baseRefName,headRefOid,files
32
+ gh pr diff <pr>
33
+ ```
34
+
35
+ Read a changed file in full wherever the diff is not enough to judge it. Read
36
+ `AGENTS.md`, then `.sws/manifest.yml`, whose recorded divergences are decisions
37
+ rather than findings, and `.sws/acknowledged.yml`, whose accepted risks are not
38
+ new findings. Leave the pull request description for last, if at all: it is the
39
+ author's account of the change, and the diff is the change.
40
+
41
+ ## What to look for, in this order
42
+
43
+ 1. **Correctness.** A concrete input or state that gives a wrong result, a
44
+ crash, or lost data. Name the scenario. "Might be fragile" is not a finding.
45
+ 2. **The one blocking thing.** A credential in the diff. Say to rotate it first,
46
+ then clean history, as `minweb.no-secrets` does. Everything else is advice.
47
+ 3. **Page furniture.** The Global Footer typed by hand rather than taken from
48
+ `standards/fragments/global-footer.yml`; anything above the Identity Bar
49
+ except a skip link; the named owners no longer discoverable on the site.
50
+ 4. **Accessibility the tools miss.** The list in `role-frontend-developer`: a
51
+ `div` that should be a `button`, a removed focus outline, a hover or focus
52
+ state that is only a colour change, a heading level chosen for its size, an
53
+ image with no alt text or dimensions. Automated checks catch about 30
54
+ percent of issues, so this is where much of the rest gets caught.
55
+ 5. **Drift from the standards.** A hardcoded hex instead of a Decanter token,
56
+ Decanter 7, a pinned version, a `tailwind.config.js`, a content backend, a
57
+ blocking git or agent hook, a committed file that points into `.claude/`, or
58
+ a departure from the recipe with no entry in `.sws/manifest.yml`.
59
+ 6. **Tests.** New logic with nothing that would fail if it broke, or a test
60
+ switched off with `.only`, `.skip` or `.fixme`.
61
+
62
+ Check the standards and prior art before calling something wrong: a choice
63
+ repeated across lineages is a convention. **Cite the standard for every policy
64
+ finding.** If you cannot cite one, it is a preference; leave it out or label it
65
+ as one.
66
+
67
+ **Keep it short.** Five real findings beat twenty nits. Skip style the linter
68
+ owns, and anything the author chose and recorded.
69
+
70
+ ## Post it as one review that blocks nothing
71
+
72
+ One review with `"event": "COMMENT"`, never `REQUEST_CHANGES`. Pull requests are
73
+ never required here, and a review that holds up a merge is a gate. **Every
74
+ comment, and the review body, starts with `<!-- sws-code-review -->`.** That
75
+ marker is how the author's agent tells these threads from a person's, because
76
+ both are posted under the same account.
77
+
78
+ Write the file with your editor's file tool, not a shell heredoc: comment
79
+ bodies contain backticks, and an unquoted heredoc runs them as commands.
80
+
81
+ ```json
82
+ {
83
+ "commit_id": "<head sha you reviewed>",
84
+ "event": "COMMENT",
85
+ "body": "<!-- sws-code-review -->\nAgent review: 2 findings. Advisory; nothing here blocks the merge.",
86
+ "comments": [
87
+ {
88
+ "path": "src/layouts/Base.astro",
89
+ "line": 41,
90
+ "side": "RIGHT",
91
+ "body": "<!-- sws-code-review -->\n**Focus outline removed.** ..."
92
+ }
93
+ ]
94
+ }
95
+ ```
96
+
97
+ ```bash
98
+ gh api repos/<owner>/<repo>/pulls/<pr>/reviews --method POST --input review.json
99
+ ```
100
+
101
+ `line` is a line number in the new version of the file, and it must fall inside
102
+ the diff, or GitHub rejects the whole review. A finding outside the diff goes in
103
+ the review body instead. Each comment says what is wrong, the scenario that
104
+ shows it, the standard it rests on, and the fix.
105
+
106
+ **No findings is a fine result.** Post the review body saying so and listing
107
+ what you checked, so the author and the person after them know it ran.
108
+
109
+ ## Then the author deals with it
110
+
111
+ The author's agent works through these threads exactly as it does Copilot's,
112
+ per `sws-github`: fix it and reply with the commit, or reply with why it does
113
+ not apply, then resolve the thread. The reviewing agent does not resolve its own
114
+ threads. After fixes are pushed, review **only what changed**, at most twice.
115
+
116
+ ## What this review is not
117
+
118
+ It is not approval. A person still reviews whatever they choose to, and a clean
119
+ agent review is no reason to skip them. It is not a compliance sign-off either:
120
+ `sws check` and the ODA accessibility review are separate, and no agent can
121
+ grant an exception (`standards/policy/escalation.md`).
@@ -31,6 +31,19 @@ fix a typo.
31
31
  If a project already has branch protection, leave it. Someone may have added it
32
32
  deliberately. Report, do not remove.
33
33
 
34
+ **Checks nag, they never gate.** Lint, typecheck, tests, and a check for
35
+ switched-off tests run in a `checks` job that the deploy job does not `need`
36
+ (`astro-static` step 8). Red there is the nag; the site still deploys. No git
37
+ hooks and no blocking agent hooks.
38
+
39
+ **When there is a pull request, two reviewers go first.** Request Copilot with
40
+ `gh pr edit <pr> --add-reviewer @copilot` (a draft needs the explicit request),
41
+ and run `sws-code-review` in a separate agent while it works. Then fix or answer
42
+ every thread from either and resolve it. Review again after pushing fixes, at
43
+ most twice each, and leave threads a person started for that person. If the
44
+ Copilot request fails, its review is not enabled here: say so and carry on. The
45
+ commands for each step are in `sws-github`.
46
+
34
47
  ## GitHub Pages
35
48
 
36
49
  **To provision a repo and turn Pages on, use the `sws-github` skill** — it drives
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sws-github
3
- description: Put a Stanford site on GitHub and deploy it to GitHub Pages, driven from the terminal. Use when a project needs a git repo, a GitHub remote, an org to own it, or a Pages deployment; when someone asks how to publish or where the code should live; or when they have no GitHub account yet.
3
+ description: Put a Stanford site on GitHub and deploy it to GitHub Pages, driven from the terminal. Use when a project needs a git repo, a GitHub remote, an org to own it, or a Pages deployment; when someone asks how to publish or where the code should live; when they have no GitHub account yet; or when opening or preparing a pull request, which gets a Copilot review whose comments are fixed or answered and resolved.
4
4
  ---
5
5
 
6
6
  # Get it on GitHub, and deployed
@@ -119,6 +119,8 @@ deploys. Many campus editors work through the GitHub web UI, which is
119
119
  push-to-main by construction, and they will not open a pull request to fix a
120
120
  typo. Pull requests are first-class and never required. If a repo already has
121
121
  protection, leave it — someone may have chosen it. Report, do not remove.
122
+ The same goes for git hooks: add none that can refuse a commit or a push.
123
+ A check belongs in CI, where failing is a red mark and stops nothing.
122
124
 
123
125
  ## The workflow
124
126
 
@@ -143,6 +145,68 @@ Two traps worth an afternoon each:
143
145
  2. **A subpath deploy needs `base`** set in the framework config, or links work
144
146
  locally and break in production. `su-sws.github.io/<repo>/` is a subpath.
145
147
 
148
+ ## Pull requests: two reviews before a person's
149
+
150
+ Never required. When there is one, opened by you or prepared for a person to
151
+ review, it gets two automated reviews first: **Copilot**, and **an agent running
152
+ `sws-code-review`**, which knows SWS policy and Copilot does not. Then deal with
153
+ every comment either leaves: fix it or answer it, and resolve it either way. An
154
+ open thread is noise for the person who reviews after you.
155
+
156
+ 1. **Start both.** A draft gets no automatic review, so always ask Copilot:
157
+ `gh pr edit <pr> --add-reviewer @copilot`. If that fails, Copilot code review
158
+ is not enabled for this repository, or `gh` is too old to know `@copilot`.
159
+ Say which, and carry on. Do not go and enable it. While Copilot works (it
160
+ takes minutes), run `sws-code-review` **in a separate agent** given the pull
161
+ request and not your account of it. That skill says how, and what to do if
162
+ your tool cannot start one.
163
+ 2. **Wait for Copilot's review of the head commit**, then read its body as well
164
+ as its threads. Give up after ten minutes and say so:
165
+
166
+ ```bash
167
+ HEAD=$(gh pr view <pr> --json headRefOid -q .headRefOid)
168
+ REVIEWS=repos/<owner>/<repo>/pulls/<pr>/reviews
169
+ COPILOT=".[] | select((.user.login | test(\"copilot\"; \"i\")) and .commit_id == \"$HEAD\")"
170
+ for i in $(seq 20); do gh api --paginate "$REVIEWS" --jq "$COPILOT | .id" | grep -q . && break; sleep 30; done
171
+ gh api --paginate "$REVIEWS" --jq "$COPILOT | .body"
172
+ ```
173
+
174
+ 3. **Work through every unresolved thread from either reviewer.** Copilot's are
175
+ known by their author, the agent review's by STARTING with the
176
+ `<!-- sws-code-review -->` marker, since it posts under your own account. A
177
+ person who quotes the marker has not started an agent thread. Paginated:
178
+
179
+ ```bash
180
+ gh api graphql --paginate -F owner=<owner> -F repo=<repo> -F pr=<pr> -f query='
181
+ query($owner: String!, $repo: String!, $pr: Int!, $endCursor: String) { repository(owner: $owner, name: $repo) {
182
+ pullRequest(number: $pr) { reviewThreads(first: 100, after: $endCursor) { pageInfo { hasNextPage endCursor }
183
+ nodes { id isResolved comments(first: 1) { nodes { author { login } path line body } } } } } } }' \
184
+ --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved | not)
185
+ | select((.comments.nodes[0].author.login | test("copilot"; "i"))
186
+ or (.comments.nodes[0].body | startswith("<!-- sws-code-review -->")))'
187
+ ```
188
+
189
+ **Fix it** and reply with what changed and the commit, or **reply with why it
190
+ does not apply**, citing the standard or the recorded decision. Copilot does
191
+ not know SWS policy: a suggestion to pin a version, add a cookie banner, or
192
+ touch the Global Footer is answered from `.sws/standards/`, not adopted.
193
+ An agent review is just as fallible, so check its claim against the code
194
+ before you act on it. Then resolve the thread:
195
+
196
+ ```bash
197
+ gh api graphql -f id=<thread-id> -f body='<reply>' -f query='mutation($id: ID!, $body: String!) {
198
+ addPullRequestReviewThreadReply(input: {pullRequestReviewThreadId: $id, body: $body}) { comment { url } } }'
199
+ gh api graphql -f id=<thread-id> -f query='mutation($id: ID!) {
200
+ resolveReviewThread(input: {threadId: $id}) { thread { isResolved } } }'
201
+ ```
202
+
203
+ 4. **After pushing fixes, review again**: Copilot with the same command, and the
204
+ agent review on what changed. **At most twice each.** A third round is a
205
+ reviewer arguing with itself; hand over.
206
+ 5. **A thread a person started is theirs to resolve.** It has neither Copilot's
207
+ login nor the marker. Reply if you have something to add. Never resolve it
208
+ for them.
209
+
146
210
  ## Verify, then say what you have not done
147
211
 
148
212
  ```bash
@@ -39,17 +39,35 @@ So: knowledge installs once per tool, the record installs once per site.
39
39
 
40
40
  | Path | What |
41
41
  |---|---|
42
- | `AGENTS.md` | The behavioral contract. Repo-rooted on purpose, so a reviewer and CI can both see it |
43
- | `standards/` | Vendored, because skills reference them by relative path and CI has no home directory to read |
42
+ | `AGENTS.md` | The behavioral contract, between `sws-agent-contract` markers. An existing `AGENTS.md` keeps its content and gets the block added; a re-run replaces only the block. Repo-rooted on purpose, so a reviewer and CI can both see it |
43
+ | `.sws/standards/` | Vendored, because CI has no home directory to read. Skills cite them as `standards/<path>`, which means `.sws/standards/<path>` in a project |
44
44
  | `.sws/manifest.yml` | What this project is and what was decided. **Never overwritten** on a re-run |
45
45
  | `.sws/acknowledged.yml` | Accepted risks, with reasons and review dates. Never overwritten |
46
46
  | `.sws/installed.json` | Hashes of what was written, so an update can tell a local edit from an old version. Commit it |
47
- | Editor pointers | `CLAUDE.md`, `.cursor/rules/sws.mdc`, and similar. Thin pointers to `AGENTS.md`, never content copies |
47
+ | Editor pointers | `CLAUDE.md` and `GEMINI.md` are exactly `@AGENTS.md`, as Next.js writes them; an existing one keeps its content and gets the line. `.github/copilot-instructions.md` and `.codex/config.toml` get a marked pointer added. `.cursor/rules/sws.mdc` and `.devin/rules/sws.md` are ours by name. All point at `AGENTS.md` and `.sws/`, never content copies |
48
+ | MCP configs | `.mcp.json`, `.vscode/mcp.json`, `.cursor/mcp.json`, `.agents/mcp_config.json` get the `sws` server added next to the project's own. One the project removed is not put back. A file with comments is reported, not rewritten |
49
+
50
+ Nothing else goes at the root, and nothing goes in `.claude/`: many teams
51
+ git-ignore it, so a committed file pointing there breaks for everyone else.
48
52
 
49
53
  **No skills.** If you find `.agents/skills/` or `.claude/skills/` inside a
50
54
  project, it predates the two-part install. That is not a fault and nothing
51
55
  breaks, but the copies there are frozen and the user-level ones are what update.
52
56
 
57
+ **A `standards/` folder at the root** is from an earlier version. The next
58
+ `add .` moves every file the install record lists into `.sws/standards/`, with
59
+ any local edit intact and still reported as a conflict, and says so in `moved`.
60
+ A file the record does not list is the team's, and stays. **If the project's
61
+ code or CI reads them at `standards/`**, as a generated footer does, the move
62
+ waits: `deferred` and an `update-references` step in `next[]` list each file
63
+ and line. Point those at `.sws/standards/` and re-run.
64
+
65
+ **A conflict on `AGENTS.md` with reason `legacy-contract`** means an older,
66
+ unmarked copy of the contract sits next to the project's own rules, so the
67
+ wizard cannot tell where it ends. Ask before touching it. Then delete that copy,
68
+ keeping their rules, and re-run; or `--force`, which replaces from its heading
69
+ to the next top-level heading.
70
+
53
71
  ## What to do with the result
54
72
 
55
73
  Read the JSON, not the prose. Four fields matter:
@@ -59,7 +77,8 @@ Read the JSON, not the prose. Four fields matter:
59
77
  - **`incomplete[]`** — manifest fields still holding placeholders. **Ask the
60
78
  person.** MinWeb requires a named business owner and technical administrator
61
79
  with real Stanford email addresses, so never invent one.
62
- - **`counts`** — tells a fresh install from a no-op re-run.
80
+ - **`counts`** — tells a fresh install from a no-op re-run. `merged` counts
81
+ files that already had the project's own content, which is kept.
63
82
  - **`dependency`** — whether `@su-sws/synthetic-web-team` reached the project's
64
83
  `devDependencies`. It has to, because unscoped `sws` on the public registry is
65
84
  an unrelated package and `npx sws` would otherwise run that instead of this
@@ -38,9 +38,10 @@ without being asked.
38
38
  3. **`.sws/acknowledged.yml`**. Accepted risks with reasons and review dates. Do
39
39
  not re-raise an acknowledged finding as if it were new. If a `review_by` date
40
40
  has passed, that is worth mentioning once, kindly.
41
- 4. **The recipe** named in the manifest, at `standards/recipes/<id>/RECIPE.md`,
42
- plus its `acceptance.yml`, which is the definition of correct for this
43
- project.
41
+ 4. **The recipe** named in the manifest, at
42
+ `.sws/standards/recipes/<id>/RECIPE.md` (`standards/` at the root, in a
43
+ project an older version installed), plus its `acceptance.yml`, which is the
44
+ definition of correct for this project.
44
45
 
45
46
  ## Tier changes the obligations
46
47
 
@@ -80,6 +81,8 @@ Then get on with the actual task.
80
81
  ## If the manifest is stale
81
82
 
82
83
  `sws doctor` compares the recorded standards version against what is installed.
83
- When it is behind, say so once and offer `sws update` to show what changed.
84
+ When it is behind, say so once and offer to run
85
+ `npx @su-sws/synthetic-web-team add .`, which is the update. There is no
86
+ `sws update`.
84
87
  **Never update without being asked.** A project pinned to older standards may be
85
88
  mid-review, or may have shipped and be under change control.
@@ -0,0 +1,56 @@
1
+ # Connectors
2
+
3
+ **Stub, 2026-09-30.** A connector pulls content from a canonical Stanford source,
4
+ such as events, news, or profiles, into a site, so nobody retypes or scrapes what
5
+ the university already publishes. See `PROJECT-PLAN.md` section 13a.
6
+
7
+ | Connector | Source | Platform | Status |
8
+ |---|---|---|---|
9
+ | [Events](events/CONNECTOR.md) | events.stanford.edu | Localist | Stub. Public API confirmed reachable |
10
+ | [News](news/CONNECTOR.md) | news.stanford.edu | Squiz Matrix | Stub. API not yet located |
11
+ | [Profiles](profiles/CONNECTOR.md) | cap.stanford.edu | CAP | Stub. Access not yet confirmed |
12
+
13
+ **None of these is a tested integration.** Each file says what has been checked
14
+ and what has not. An agent asked to wire one up should say that it is a stub,
15
+ use what is known, and not invent endpoints, fields, or credentials.
16
+
17
+ ## The shape every connector takes
18
+
19
+ A proposal to be tested in the first real build, not a settled standard.
20
+
21
+ 1. **Fetch at build time or on a schedule, never from the visitor's browser.**
22
+ The site stays static, no key ever reaches the browser, a source outage does
23
+ not break a page, and the accessibility checks see the content, because it is
24
+ in the built HTML.
25
+ 2. **Snapshot into the repository.** A scheduled GitHub Actions job fetches the
26
+ source, writes a data file such as `src/data/events.json`, and commits it to
27
+ `main`. Push to `main` deploys, so every content change is a commit that runs
28
+ `sws a11y`. That is the same control `standards/scope.md` relies on for
29
+ content authored in the repo. The cost is a commit from a bot on every change.
30
+ Fetching at build time without committing is the alternative: fewer commits,
31
+ but the content never appears in git history.
32
+ 3. **Credentials live in Actions secrets.** Never in the repository and never in
33
+ the build output. Committed credentials are the one check that blocks.
34
+ 4. **Link back to the source.** Each item links to its canonical page on the
35
+ source site. Republishing full text as if it were yours creates duplicate
36
+ content and a second copy to keep current. The source stays authoritative.
37
+ 5. **Permission belongs to the system owner.** Being able to reach an API is not
38
+ the same as being allowed to depend on it. Confirm with whoever runs the
39
+ source before a site relies on it. Where that owner is not known, use the
40
+ general UIT contact and say that is what you are doing, per
41
+ `standards/policy/escalation.md`.
42
+
43
+ ## A scope question this raises
44
+
45
+ `standards/scope.md` says content comes from the repository. The snapshot
46
+ pattern keeps that true where it matters, because the content goes through git
47
+ and the checks. Whether it counts as content from the repo is a call for SWS to
48
+ make, and it should be made before the first connector moves out of stub.
49
+
50
+ ## What a connector is not
51
+
52
+ - **Not an embed.** Localist and others offer JavaScript widgets that render in
53
+ the browser. Those are third-party content whose accessibility is not yours to
54
+ control. See `standards/patterns/bolt-ons.md`.
55
+ - **Not a CMS.** A connector reads someone else's published content. It gives
56
+ the site no editing interface.
@@ -0,0 +1,62 @@
1
+ ---
2
+ id: events
3
+ name: Stanford Events
4
+ source: https://events.stanford.edu
5
+ platform: Localist
6
+ summary: Upcoming events from the university calendar, filtered for your unit, series, or topic.
7
+ provides: Event title, dates, location, description, and a link to the canonical event page.
8
+ auth: None for public events. Verified 2026-09-30.
9
+ status: stub
10
+ reviewed: 2026-09-30
11
+ ---
12
+
13
+ # Connector: Stanford Events
14
+
15
+ **Stub. Not built, not tested in a site.** The university calendar at
16
+ events.stanford.edu runs on Localist. A unit that already posts its events there
17
+ should not type them again into its own site.
18
+
19
+ ## Verified
20
+
21
+ Checked on 2026-09-30 with a plain HTTPS request:
22
+
23
+ - `https://events.stanford.edu/api/2/events` returns JSON with **no
24
+ authentication**.
25
+ - The response has three top-level keys: `events`, `page`, and `date`. Each item
26
+ in `events` is wrapped in an `event` object with fields that include `id`,
27
+ `title`, `url`, `first_date`, `last_date`, `location_name`, `room_number`,
28
+ `status`, and `experience` (for example `inperson`).
29
+ - `pp` sets the page size. `page` reports `current`, `size`, `total`,
30
+ `total_items`, `next_page`, and `previous_page`.
31
+ - The request accepted `days` and `keyword` parameters with a 200. **Whether
32
+ they filter as expected was not checked.**
33
+
34
+ ## Not yet known
35
+
36
+ - **How to select one unit's events.** Localist instances usually filter by
37
+ group, department, or type. Which of those Stanford's instance uses, and the
38
+ IDs, need confirming.
39
+ - **Who owns the calendar, and whether sites may depend on the API.** Ask
40
+ before relying on it. If the owner is not known, use the general UIT contact.
41
+ - **Rate limits and terms of use.**
42
+ - **Whether descriptions are HTML, and how clean it is.** Imported HTML can
43
+ bring headings out of order, missing alt text, or inline styles. Those would
44
+ then fail the site's own checks.
45
+
46
+ ## Likely shape
47
+
48
+ Per `standards/connectors/README.md`: a scheduled Action fetches upcoming events
49
+ for the unit, writes `src/data/events.json`, and commits it. Pages render from
50
+ that file and link every event to its `url` on events.stanford.edu.
51
+
52
+ This pairs with the **seminar series** starter prompt. A unit that posts talks
53
+ to the calendar could feed the site from it, instead of keeping one file per
54
+ talk.
55
+
56
+ ## What to do now
57
+
58
+ 1. Say this connector is a stub.
59
+ 2. Use only the verified facts above. Do not invent filter parameters.
60
+ 3. Fetch at build time or on a schedule, not in the browser, and do not use the
61
+ Localist embed widget as a shortcut.
62
+ 4. Record the dependency under `divergences:` in `.sws/manifest.yml`.
@@ -0,0 +1,51 @@
1
+ ---
2
+ id: news
3
+ name: Stanford News
4
+ source: https://news.stanford.edu
5
+ platform: Squiz Matrix
6
+ summary: Stanford Report stories about your unit, school, or topic, linked back to the original.
7
+ provides: Headline, summary, date, image, and a link to the canonical story.
8
+ auth: Unknown. To confirm with the site's owner.
9
+ status: stub
10
+ reviewed: 2026-09-30
11
+ ---
12
+
13
+ # Connector: Stanford News
14
+
15
+ **Stub. Not built, not tested.** news.stanford.edu is built on Squiz Matrix and
16
+ exposes an API through the site itself. A unit that wants an "in the news"
17
+ section should pull from it rather than copying stories by hand.
18
+
19
+ ## Verified
20
+
21
+ Nothing yet beyond what SWS has reported: the site runs on Squiz Matrix and has
22
+ an API built in.
23
+
24
+ ## Not yet known
25
+
26
+ - **The endpoint, its parameters, and its response shape.** Do not guess them.
27
+ Squiz Matrix builds APIs per site rather than offering one standard API, so
28
+ general knowledge of Squiz will not tell you what this one does.
29
+ - **Whether it needs credentials.** If it does, they go in Actions secrets,
30
+ never in the repository or the build.
31
+ - **How stories are tagged**, and so how a unit selects its own: by school,
32
+ department, topic, or something else.
33
+ - **Image rights and alt text.** Whether a story's image may be reused on
34
+ another site, and whether the API returns alt text with it. Without alt text,
35
+ the image fails the site's accessibility checks.
36
+ - **Who owns the API, and whether sites may depend on it.**
37
+
38
+ ## Likely shape
39
+
40
+ Per `standards/connectors/README.md`: a scheduled Action fetches recent stories
41
+ for the unit, writes `src/data/news.json`, and commits it. Show the headline, the
42
+ summary, and the date, and link every item to its story on news.stanford.edu.
43
+ Do not republish the full text.
44
+
45
+ ## What to do now
46
+
47
+ 1. Say this connector is a stub and the API has not been located.
48
+ 2. Do not scrape the news site's HTML as a substitute. A scraper breaks without
49
+ warning when the site's markup changes.
50
+ 3. Until the API is confirmed, a short hand-maintained list of links in the
51
+ repository is the honest fallback.
@@ -0,0 +1,58 @@
1
+ ---
2
+ id: profiles
3
+ name: Stanford Profiles
4
+ source: https://cap.stanford.edu
5
+ platform: CAP
6
+ summary: Faculty and staff profiles from CAP, so people pages stay current without retyping.
7
+ provides: Name, title, photo, bio, appointments, and a link to the person's Stanford Profiles page.
8
+ auth: Expected to need issued credentials. Not yet confirmed.
9
+ status: stub
10
+ reviewed: 2026-09-30
11
+ ---
12
+
13
+ # Connector: Stanford Profiles
14
+
15
+ **Stub. Not built, not tested.** Stanford Profiles is backed by CAP
16
+ (cap.stanford.edu), which has an API. A lab or department people page is the
17
+ most common thing on a Stanford site, and the most often out of date. Pulling
18
+ from Profiles keeps it current from the source people already maintain.
19
+
20
+ ## Verified
21
+
22
+ Nothing yet beyond what SWS has reported: CAP has an API and Stanford sites
23
+ connect to it.
24
+
25
+ ## Not yet known
26
+
27
+ - **How access is granted.** Expect issued credentials, requested from CAP's
28
+ owners. **This is unconfirmed.** If credentials are needed, they go in Actions
29
+ secrets, never in the repository or the build. A static site **cannot** call
30
+ an authenticated API from the browser without publishing the credential,
31
+ which is why the fetch has to happen at build time.
32
+ - **The endpoints, the fields, and how to select a group's members.**
33
+ - **Which fields are public.** Profiles content is about people. Publish only
34
+ what the person has already made public on their Stanford Profile. If a field
35
+ is not public there, it does not go on the site. If a site would show more
36
+ than that, it is a privacy question, and the door is the University Privacy
37
+ Office.
38
+ - **Photo alt text.** Whether the API supplies any. The person's name alone is
39
+ usually not enough, and the checks will flag a missing alt.
40
+ - **Who owns the API, and the terms for depending on it.**
41
+
42
+ ## Likely shape
43
+
44
+ Per `standards/connectors/README.md`: a scheduled Action authenticates with
45
+ secrets, fetches the group's profiles, writes `src/data/people.json` with the
46
+ public fields only, and commits it. Each person links to their Stanford
47
+ Profiles page.
48
+
49
+ This pairs with the **lab or research group** starter prompt. People pages
50
+ could come from Profiles instead of one hand-written file per person. Students
51
+ and visitors often have no profile, so expect to mix the two.
52
+
53
+ ## What to do now
54
+
55
+ 1. Say this connector is a stub and access has not been confirmed.
56
+ 2. Do not scrape profile pages as a substitute.
57
+ 3. Until access is confirmed, keep people as files in the repository and link
58
+ each person to their Stanford Profile.
@@ -0,0 +1,45 @@
1
+ # Bolt-on services
2
+
3
+ **Stub, 2026-09-30.** A placeholder for the dynamic features a static site gets
4
+ from outside: forms, data, search, AI, scheduled data pulls, analytics, maps, and
5
+ access control. See `PROJECT-PLAN.md` section 13a.
6
+
7
+ ## There is no approved list
8
+
9
+ **Nothing in this file is approved, recommended, or ranked.** An approved list,
10
+ and the data risk level each entry may handle, is for **UIT Security** and the
11
+ **University Privacy Office** to set. It is not ours to set. Until they publish
12
+ one, the house rule from `AGENTS.md` applies: state the obligation, name the
13
+ office, stop.
14
+
15
+ ## Categories
16
+
17
+ | Need | Obligation that applies today | Approved option |
18
+ |---|---|---|
19
+ | **Forms** | Collecting personal data moves the site out of the `low` tier. A transparency notice comes before collection. See `standards/patterns/forms.md` and MinPriv | TBD |
20
+ | **Data, lightweight database** | A new third-party service handling personal data triggers a DRA. Any key in a static build is public | TBD |
21
+ | **Media** | Third-party content is outside the build, so its accessibility is not yours to control | TBD |
22
+ | **Search** | An index built from the repo at build time adds no third party. A hosted search service does | TBD |
23
+ | **AI features** | A new third-party service, usually receiving visitor input. DRA likely | TBD |
24
+ | **Scheduled data pulls** | Credentials live in Actions secrets, never in the repo. This is the one blocking check | TBD |
25
+ | **Analytics** | **Siteimprove registration is required. Google Analytics is not.** Analytics is a privacy choice | Siteimprove (required, not a bolt-on choice) |
26
+ | **Maps** | Third-party content: ask for a VPAT per `standards/policy/procurement.md` | TBD |
27
+ | **Access control** | A tier change. See the `role-identity-engineer` stub and `standards/policy/identity.md` | TBD |
28
+
29
+ ## A scope collision to settle first
30
+
31
+ `standards/scope.md` says content comes from the repository. Some of these
32
+ services are a **content source** rather than a feature: a Google Sheet that
33
+ feeds the people page, or a database that feeds the resource list. That is a CMS
34
+ by another name, and the manifest records it under `content.source`. Decide
35
+ which bolt-ons are features and which are content backends **before** writing
36
+ recipes for them, or this file will widen the scope by the back door.
37
+
38
+ ## What to do now, if a site needs one of these
39
+
40
+ 1. Name the obligation from the table, in plain language.
41
+ 2. If personal data or a new third-party service is involved, route to the DRA
42
+ process through UIT Security, per `standards/policy/escalation.md`. One door.
43
+ 3. Do not pick a vendor for them, and do not describe anything here as approved.
44
+ 4. If they go ahead, record the service under `divergences:` in
45
+ `.sws/manifest.yml` with what it handles.