The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
feat(release): thorough notes skeletons — nest each PR's summary at creation (#12124)
Devin Foley890ab9acfe8c
diff --git a/.agents/skills/release-changelog/SKILL.md b/.agents/skills/release-changelog/SKILL.mdindex 55e7b360ea..022df4ae5b 100644--- a/.agents/skills/release-changelog/SKILL.md+++ b/.agents/skills/release-changelog/SKILL.md@@ -168,6 +168,11 @@ Guidelines:- write from the user perspective- keep highlights short and concrete- spell out upgrade actions for breaking changes+- **write at full stable depth from the first pass**: the beta-keyed+ draft ships verbatim as the stable's notes, so the previous stable's+ file is the density bar the moment the draft is first written — never+ leave it at generated-skeleton density for the soak. The skeleton's+ nested PR summaries are raw material to rewrite, not a format to keep.- **describe deltas, not repeats**: read the previous stable's notes(`releases/v<last-stable>.md`) before writing. When they alreadyintroduced a feature, this release's entry covers only what changed —diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 29abc996c5..1f0511e051 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -647,6 +647,9 @@ jobs:timeout-minutes: 10permissions:contents: write+ # gh pr view needs PR read for the skeleton's nested summaries;+ # without it the enrichment silently degrades to bare subjects.+ pull-requests: readsteps:- name: Checkout repositoryuses: actions/checkout@v7@@ -661,6 +664,9 @@ jobs:- name: Draft stable notes from the published betaenv:+ # gh needs a token so the generator can nest each PR's summary+ # under its subject line (best-effort thoroughness).+ GH_TOKEN: ${{ github.token }}BETA_VERSION: ${{ needs.publish_beta.outputs.beta_version }}SOURCE_SHA: ${{ needs.select_beta.outputs.sha }}run: |diff --git a/scripts/draft-stable-notes.sh b/scripts/draft-stable-notes.shindex 5bd42e9ba1..45be29edc3 100755--- a/scripts/draft-stable-notes.sh+++ b/scripts/draft-stable-notes.sh@@ -123,6 +123,26 @@ fisubjects="$(git -C "$repo_dir" log --no-merges --format='%s' "$range")"+# Best-effort thoroughness: nest each referenced PR's own summary under its+# subject line, so the skeleton is a genuinely thorough raw document at+# creation time instead of a bare commit list. Prefers the PR template's+# "What Changed" bullets, falls back to the first prose lines. Degrades+# silently when gh or the network is unavailable (tests, offline runs);+# set DRAFT_NOTES_SKIP_PR_ENRICHMENT=1 to disable explicitly.+enrich_pr() {+ local pr_num="$1" pr_body excerpt+ [ "${DRAFT_NOTES_SKIP_PR_ENRICHMENT:-0}" = "1" ] && return 0+ pr_body="$(cd "$repo_dir" && gh pr view "$pr_num" --json body --jq .body 2>/dev/null || true)"+ [ -n "$pr_body" ] || return 0+ if printf '%s\n' "$pr_body" | grep -q '^## What Changed'; then+ excerpt="$(printf '%s\n' "$pr_body" | sed -n '/^## What Changed/,/^## /p' | grep -E '^- ' | head -3 || true)"+ else+ excerpt="$(printf '%s\n' "$pr_body" | grep -vE '^[[:space:]]*$|^#|^>|^<!--' | head -2 || true)"+ fi+ [ -n "$excerpt" ] || return 0+ printf '%s\n' "$excerpt" | sed 's/^/ > /'+}+section() {local title="$1" pattern="$2" invert="${3:-false}" bodyif [ "$invert" = true ]; then@@ -132,7 +152,14 @@ section() {fi[ -n "$body" ] || return 0printf '## %s\n\n' "$title"- printf '%s\n' "$body" | sed 's/^/- /'+ while IFS= read -r subject_line; do+ [ -n "$subject_line" ] || continue+ printf -- '- %s\n' "$subject_line"+ pr_ref="$(printf '%s' "$subject_line" | grep -oE '\(#[0-9]+\)$' | tr -dc '0-9' || true)"+ if [ -n "$pr_ref" ]; then+ enrich_pr "$pr_ref"+ fi+ done <<< "$body"printf '\n'}diff --git a/scripts/draft-stable-notes.test.mjs b/scripts/draft-stable-notes.test.mjsindex 53479a8773..e0c38199eb 100644--- a/scripts/draft-stable-notes.test.mjs+++ b/scripts/draft-stable-notes.test.mjs@@ -1,6 +1,6 @@import assert from "node:assert/strict";import { execFileSync } from "node:child_process";-import { mkdtempSync, readFileSync } from "node:fs";+import { mkdtempSync, readFileSync, writeFileSync } from "node:fs";import { tmpdir } from "node:os";import { join } from "node:path";import test from "node:test";@@ -137,6 +137,76 @@ test("writes to releases/beta/v<version>.md inside the repo by default", () => {assert.match(body, /- feat: default path \(#1\)/);});+test("nests PR summaries under subjects when gh can serve them", () => {+ const dir = makeFixtureRepo();+ commit(dir, "feat: enriched work (#42)");+ git(dir, "tag", "beta/v2026.100.0-beta.0");++ const binDir = join(dir, "fake-bin");+ execFileSync("mkdir", ["-p", binDir]);+ writeFileSync(+ join(binDir, "gh"),+ `#!/usr/bin/env bash+echo "## Thinking Path"+echo ""+echo "## What Changed"+echo ""+echo "- Adds the enriched thing"+echo "- Covers it with tests"+echo ""+echo "## Risks"+`,+ { mode: 0o755 }+ );++ const out = join(dir, "draft.md");+ execFileSync(+ "bash",+ [script, "2026.100.0-beta.0", "--repo-dir", dir, "--out", out],+ { encoding: "utf8", env: { ...process.env, PATH: `${binDir}:${process.env.PATH}` } }+ );+ const body = readFileSync(out, "utf8");+ assert.match(body, /- feat: enriched work \(#42\)\n > - Adds the enriched thing\n > - Covers it with tests/);+});++test("survives a PR body whose What Changed section has no bullets", () => {+ const dir = makeFixtureRepo();+ commit(dir, "feat: sparse body (#9)");+ git(dir, "tag", "beta/v2026.100.0-beta.0");++ const binDir = join(dir, "fake-bin");+ execFileSync("mkdir", ["-p", binDir]);+ writeFileSync(+ join(binDir, "gh"),+ `#!/usr/bin/env bash+echo "## What Changed"+echo ""+echo "## Risks"+`,+ { mode: 0o755 }+ );++ const out = join(dir, "draft.md");+ execFileSync(+ "bash",+ [script, "2026.100.0-beta.0", "--repo-dir", dir, "--out", out],+ { encoding: "utf8", env: { ...process.env, PATH: `${binDir}:${process.env.PATH}` } }+ );+ const body = readFileSync(out, "utf8");+ assert.match(body, /- feat: sparse body \(#9\)\n/);+});++test("skeleton stays clean when enrichment is unavailable", () => {+ const dir = makeFixtureRepo();+ commit(dir, "feat: plain work (#7)");+ git(dir, "tag", "beta/v2026.100.0-beta.0");++ const { body } = runDraft(dir, "2026.100.0-beta.0");++ assert.match(body, /- feat: plain work \(#7\)\n/);+ assert.doesNotMatch(body, / > /);+});+test("rejects a malformed beta version", () => {const dir = makeFixtureRepo();assert.throws(() =>