From a7c32617fa43a74fb21675a8f8214c2abe33b31a Mon Sep 17 00:00:00 2001 From: Elliot Taylor Date: Mon, 18 May 2026 11:38:13 +0100 Subject: [PATCH 1/2] Add public Changelog with API & integrator changes per month MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds src/content/docs/changelog.md covering Nov 2025 → May 2026, generated by reading merged PRs from patchstack/saas and patchstack/hub and curating customer-facing changes into a monthly digest. Each month calls out API/breaking/behaviour changes in a dedicated section before the highlights, so integrators get upfront visibility into changes that affect their integrations. Wires the page into the Starlight sidebar after FAQ and adds a project-scoped Claude skill (.claude/skills/changelog/SKILL.md) that auto-detects initial vs incremental mode and regenerates this page from recent merged PRs. Co-Authored-By: Claude Opus 4.7 (1M context) --- .claude/skills/changelog/SKILL.md | 176 ++++++++++++ astro.config.mjs | 1 + src/content/docs/changelog.md | 449 ++++++++++++++++++++++++++++++ 3 files changed, 626 insertions(+) create mode 100644 .claude/skills/changelog/SKILL.md create mode 100644 src/content/docs/changelog.md diff --git a/.claude/skills/changelog/SKILL.md b/.claude/skills/changelog/SKILL.md new file mode 100644 index 0000000..c0a9b19 --- /dev/null +++ b/.claude/skills/changelog/SKILL.md @@ -0,0 +1,176 @@ +--- +name: changelog +description: Generate or update the public-facing changelog at src/content/docs/changelog.md from merged PRs in patchstack/saas and patchstack/hub. Use when the user asks to "update the changelog", "create the changelog", "/changelog", or wants public release notes refreshed from recent PRs. +--- + +# Patchstack Documentation Changelog + +Generates and maintains a customer-facing changelog at `src/content/docs/changelog.md` by reading merged PRs from `patchstack/saas` and `patchstack/hub`. Format is a monthly digest: a short narrative + bulleted highlights per month, grouped newest-first. + +The skill has **two modes** auto-detected from the current state of the changelog file: + +- **Initial backfill** — `changelog.md` does not exist. Pull PRs from the last 6 months and seed the file. +- **Incremental update** — `changelog.md` exists. Pull PRs merged since the `` marker at the top of the file and merge them in. + +Always draft → review with the user → write. Never write directly without showing the diff. + +## Mode detection + +Read `src/content/docs/changelog.md`. + +- File missing → initial backfill mode. Cutoff date = today minus 6 months (use `date -v-6m +%Y-%m-%d` on macOS). +- File exists → incremental mode. Parse the `` marker. Cutoff = that date. + - If the marker is missing (corrupted file), fall back to scanning the latest month heading and ask the user to confirm the cutoff before proceeding. + +## Step 1 — Fetch merged PRs + +Run both repos in parallel via `gh`: + +```bash +gh pr list --repo patchstack/saas --state merged --base main \ + --search "merged:>=" --limit 500 \ + --json number,title,body,labels,mergedAt,author,url + +gh pr list --repo patchstack/hub --state merged --base main \ + --search "merged:>=" --limit 500 \ + --json number,title,body,labels,mergedAt,author,url +``` + +Tag each PR with its product (`hub` or `saas`) so the source is preserved through filtering. + +## Step 2 — Auto-drop noise + +Drop a PR before classification if **any** of these apply: + +- Has the `dependencies` label. +- Title matches (case-insensitive): `^chore\(deps`, `^Bump `, `^Revert "Bump`, `^Revert "chore\(deps`, `^Merge `, `^Sync `. +- Title is purely CI / tooling / repo-housekeeping: `ci:`, `chore: ci`, `update workflow`, `bump action`, `pin `, `lint`, `formatter`, `pre-commit`, `editorconfig`. +- Author is a bot (`dependabot`, `renovate`, `github-actions`). +- Pure reverts (`^Revert "...`) — the reverted change presumably never reached customers; do not surface the back-and-forth. + +Keep a count of dropped PRs so it can be shown in the review summary ("filtered 47 dependency / CI PRs"). + +## Step 3 — Classify survivors + +For each remaining PR, decide: + +1. **Customer-facing?** Skip if it's only internal refactor, test changes, dev tooling, internal logging, or schema-only changes with no customer visibility. When in doubt, read the body — if it doesn't change what a customer sees or can do, drop it. +2. **Category** — exactly one of: + - **Added** — new feature, new endpoint, new product surface. + - **Improved** — enhancement to existing behavior, performance, UX polish, expanded API. + - **Fixed** — bug fix. + - **Security** — vulnerability fix or hardening (rare; only flag when clearly security-driven). +3. **Surface** — one of `Hub`, `SaaS`, `API`, or `Both` (when a change spans products). API-only changes (OpenAPI spec, endpoints) usually surface as `API` even if they came from saas/hub. + +If a PR title references a ticket (`ENG-2839`, `[FEAT]`, etc.), strip that for the rewrite. + +## Step 4 — Rewrite to customer voice + +Rewrite each PR's title (using its body for context) into a single, present-tense, customer-facing sentence. + +- Speak to outcomes, not implementation. ✅ "Vulnerability dashboard now appends results when you click Load more." ❌ "Append vulnerabilities on dashboard Load more instead of replacing." +- Drop internal names (controller / job / model names) unless they're customer-facing concepts. +- No "we" / "I" — neutral product voice. ✅ "Dashboard load times improved." ❌ "We made the dashboard faster." +- Keep it one sentence. If a PR genuinely needs two, split — but most don't. +- Don't invent. If you can't tell what a PR does from title + body, skip it and note it in the review summary. + +## Step 5 — Group by month, draft the output + +Group entries by the month of `mergedAt` (YYYY-MM). For each month, write **in this order**: + +1. A heading `## ` (e.g. `## May 2026`). +2. A 1–2 sentence narrative summary of the month's theme. Conversational, not a copy of the bullets below. +3. **`### API & integrator changes`** (only when applicable — see below). +4. A `**Highlights**` line followed by 6–10 bullets — the most impactful customer-visible changes — each prefixed with the surface in bold: `- **Hub** — …`. +5. A `
Other changes` block containing the remaining customer-facing entries, grouped by category (**Added** → **Improved** → **Fixed** → **Security**). Close with `
`. + +Months go newest-first. If a month has no Highlights-worthy items beyond a couple of bullets, skip the `
` block. + +### The API & integrator changes section (important) + +For any month that includes changes affecting API consumers, partner integrations, or external clients, insert a dedicated `### API & integrator changes` subsection **between the narrative and the Highlights**. This is non-optional — integrators have explicitly asked for upfront visibility into API changes. + +Surface any of: + +- **Breaking** — response shape change, removed/renamed field, renamed endpoint, stricter validation that may reject previously-accepted payloads. +- **Behaviour change** — non-breaking but observable change (e.g. response now includes zero-filled days, endpoint now returns 404 where it used to return 500, validation tightened, rate limiting added, caching headers changed, graceful degradation replaces an error). +- **New endpoint** / **New field** — additive but worth flagging so integrators can adopt. +- **Deprecation** — field/endpoint still works but is on the way out. + +Format each bullet as `- **