Skip to content

Commit d9d5aa3

Browse files
committed
Open an evergreen docs PR after each SDK publish
1 parent 46f0f49 commit d9d5aa3

3 files changed

Lines changed: 470 additions & 0 deletions

File tree

‎.github/prompts/update-docs.md‎

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Update docs for the Node SDK
2+
3+
You are working in the `kernel/docs` checkout. Read its AGENTS.md and
4+
`.docs/code-example-guide.md` first and follow them for every change.
5+
The published Node SDK source for the `SDK_VERSION` environment variable is in `../sdk`.
6+
The Python and Go SDKs generated from the same API spec are in `../python-sdk` and
7+
`../go-sdk`, checked out at the matching release tag when one exists.
8+
9+
## Audit
10+
11+
1. Read `$RUNNER_TEMP/sdk-diff.patch`. It covers `CHANGELOG.md`, `api.md`, and
12+
`src/resources` in the Node SDK since the last release the docs were updated for.
13+
Enumerate user-facing changes: new resources and methods, new or changed
14+
parameters and response fields, new enum values, deprecations, and removals.
15+
2. Read `$RUNNER_TEMP/openapi-diff.patch` and the matching parts of
16+
`$RUNNER_TEMP/kernel-api/packages/api/openapi.yaml`. The SDKs are generated from
17+
this spec, so its summaries and descriptions are the source of truth for what the
18+
API does: limits, defaults, units, accepted values, and caveats.
19+
3. Find every docs page that covers the affected features. Search the `.mdx` files for
20+
the SDK method names, parameter names, and related concepts. Check `docs.json` for
21+
navigation.
22+
23+
## Update
24+
25+
1. Update existing pages whose content the release makes wrong or incomplete: changed
26+
signatures, renamed or removed parameters, new options on a documented feature,
27+
new enum values in documented lists, and deprecations.
28+
2. Document new user-facing capabilities. Prefer adding a section to the page that
29+
already covers the feature. Create a new page only for a capability no existing page
30+
covers, and add it to `docs.json` navigation next to related pages.
31+
3. Every code example must call methods and parameters that exist in the checked-out
32+
SDKs. Verify TypeScript against `../sdk/api.md` and `../sdk/src/resources`, Python
33+
against `../python-sdk/api.md` and `../python-sdk/src/kernel/{resources,types}`, and Go
34+
against `../go-sdk/api.md` and the Go sources. Include TypeScript and Python
35+
versions, and a Go version wherever the surrounding page already shows Go. If a
36+
language's SDK does not have the method yet, leave that language out rather than
37+
guessing.
38+
4. Preserve meaning exactly: limits, defaults, units, accepted values, deprecations,
39+
and caveats must match the spec. Do not invent behavior the spec does not state.
40+
Plan or pricing availability that the spec does not state is out of scope.
41+
5. Follow the style of the surrounding page. Change only text the release affects or
42+
that the release shows to be wrong. Do not restyle, reorganize, or reword unrelated
43+
content.
44+
45+
Skip changes with no user-facing effect: internal or hosted-login callback endpoints,
46+
SDK codegen and dependency churn, and type-only refactors. Not every release needs a
47+
docs change. If none does, change nothing.
48+
49+
The API reference pages are generated from the published spec, so do not hand-write
50+
endpoint reference pages. The CLI and MCP server reference (`reference/cli*`,
51+
`reference/mcp-server*`) and `changelog.mdx` are maintained separately; do not edit them.
52+
53+
## Validate and report
54+
55+
Run `mint broken-links` from the docs checkout and fix any broken links your changes
56+
introduce. Run `jq empty docs.json` if you edited `docs.json`. Do not run `mint dev`.
57+
58+
Read the complete diff against origin/main before finishing. Remove filler, unrelated
59+
changes, and anything that does not follow AGENTS.md.
60+
61+
Write `$RUNNER_TEMP/docs-update-report.md` with concise sections describing:
62+
63+
- Pages updated or added, with the SDK methods, parameters, or spec changes each
64+
change follows.
65+
- SDK changes intentionally left undocumented and why.
66+
- Any languages left out of examples because an SDK lacks the method.
67+
- Any validation limitations.
68+
69+
If no docs changes are needed, explicitly say that the audit of the SDK diff found
70+
nothing user-facing to document. Never claim checks passed unless you ran them.
71+
The report becomes part of a public PR: include no credentials, customer information,
72+
private discussions, or internal URLs.
73+
74+
Do not commit, push, open or merge a PR. The workflow validates the changes and
75+
opens or updates the evergreen PR only after all checks pass.
76+
77+
Only `docs.json` and `.mdx` files are published, excluding hidden directories,
78+
`changelog.mdx`, and the CLI and MCP server reference; the workflow discards every
79+
other change before validation. Do not add images. Keep scratch files, logs, and
80+
command output outside the checkout, under `$RUNNER_TEMP`.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
# Reads NUL-delimited docs paths on stdin and prints, NUL-delimited,
3+
# the ones the docs updater must not publish.
4+
set -euo pipefail
5+
6+
while IFS= read -r -d '' path; do
7+
case "$path" in
8+
.* | changelog.mdx | reference/cli.mdx | reference/cli/* | reference/mcp-server.mdx | reference/mcp-server/*) ;;
9+
docs.json | *.mdx) continue ;;
10+
esac
11+
printf '%s\0' "$path"
12+
done

0 commit comments

Comments
 (0)