Skip to content

Commit 6355dbb

Browse files
committed
Refactor changelog management and update workflows for version-first authoring
- Transitioned from `CHANGELOG-UPCOMING.md` to semver-named changelog files located in `docs/development/CHANGELOGS/`, enabling continuous updates during development. - Updated `publish-main.yml` and `publish-staging.yml` workflows to read release notes from the new semver changelog files. - Enhanced `bump-version.sh` to create and stage the changelog file upon version bump, ensuring immediate availability for updates. - Deprecated the use of `CHANGELOG-UPCOMING.md` in documentation and workflows, streamlining the changelog process for both staging and main releases. - Added a new changelog file for version 0.1.10 to reflect the migration to the new system.
1 parent 5d8dcd2 commit 6355dbb

12 files changed

Lines changed: 81 additions & 83 deletions

File tree

.cursor/skills/cursor-copilot-sync/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ Use this workflow whenever customization files are changed.
4444

4545
- Rules are transformed from Cursor frontmatter (`globs`, `alwaysApply`) to Copilot frontmatter (`applyTo`).
4646
- Skill frontmatter is normalized so `name` matches the skill folder name.
47+
- Skill markdown should keep exactly one blank line between closing frontmatter (`---`) and content.
4748
- Validation enforces source/mirror parity for skills, rules, and `.cursorrules`/`copilot-instructions`.

.cursor/skills/release-changelog/SKILL.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: release-changelog
3-
description: "Keep the upcoming release note buffer updated on develop; ties into publish-staging and publish-main (RTM) and GitHub release/archive automation."
3+
description: "Use version-first changelog files (docs/development/CHANGELOGS/X.Y.Z.md): bump version at start of work and write release notes continuously for staging and main releases."
44
---
55

66
# Release changelog (Metaboost)
@@ -11,13 +11,15 @@ When you ship or finish work that is **worth calling out** in preprod/prod relea
1111

1212
## What to update
1313

14-
- Edit [docs/operations/CHANGELOG-UPCOMING.md](../../docs/operations/CHANGELOG-UPCOMING.md) on **`develop` only** (promotion branches are triggers only—see [PUBLISH.md](../../PUBLISH.md)).
14+
- Use [docs/development/CHANGELOGS/X.Y.Z.md](../../docs/development/CHANGELOGS/) where `X.Y.Z` is the current base version in `package.json`.
15+
- Bump version **at the start of work** with `scripts/publish/bump-version.sh` so `docs/development/CHANGELOGS/X.Y.Z.md` exists before implementation.
16+
- Keep updating that same semver file continuously as work lands.
1517

1618
## Conventions
1719

1820
1. **Order****Most important first** (safety, security, data, then big features, then smaller fixes; skip low-signal items).
1921
2. **Wording** — Short, clear lines; link issues/PRs if useful.
20-
3. **Markers**Put new bullets between `UPCOMING-AUTO-START` and `UPCOMING-AUTO-END` so post-publish automation can reset that block via PR. Notes **above** the block are not auto-cleared.
22+
3. **Single source**Staging prereleases and main production releases both read the same `X.Y.Z.md` file.
2123
4. **Brevity** — Concise, not a duplicate of git log.
2224

2325
## Naming in CI

.github/skills/cursor-copilot-sync/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ Use this workflow whenever customization files are changed.
4444

4545
- Rules are transformed from Cursor frontmatter (`globs`, `alwaysApply`) to Copilot frontmatter (`applyTo`).
4646
- Skill frontmatter is normalized so `name` matches the skill folder name.
47+
- Skill markdown should keep exactly one blank line between closing frontmatter (`---`) and content.
4748
- Validation enforces source/mirror parity for skills, rules, and `.cursorrules`/`copilot-instructions`.

.github/skills/release-changelog/SKILL.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: release-changelog
3-
description: "Keep the upcoming release note buffer updated on develop; ties into publish-staging and publish-main (RTM) and GitHub release/archive automation."
3+
description: "Use version-first changelog files (docs/development/CHANGELOGS/X.Y.Z.md): bump version at start of work and write release notes continuously for staging and main releases."
44
---
55

66
# Release changelog (Metaboost)
@@ -11,13 +11,15 @@ When you ship or finish work that is **worth calling out** in preprod/prod relea
1111

1212
## What to update
1313

14-
- Edit [docs/operations/CHANGELOG-UPCOMING.md](../../docs/operations/CHANGELOG-UPCOMING.md) on **`develop` only** (promotion branches are triggers only—see [PUBLISH.md](../../PUBLISH.md)).
14+
- Use [docs/development/CHANGELOGS/X.Y.Z.md](../../docs/development/CHANGELOGS/) where `X.Y.Z` is the current base version in `package.json`.
15+
- Bump version **at the start of work** with `scripts/publish/bump-version.sh` so `docs/development/CHANGELOGS/X.Y.Z.md` exists before implementation.
16+
- Keep updating that same semver file continuously as work lands.
1517

1618
## Conventions
1719

1820
1. **Order****Most important first** (safety, security, data, then big features, then smaller fixes; skip low-signal items).
1921
2. **Wording** — Short, clear lines; link issues/PRs if useful.
20-
3. **Markers**Put new bullets between `UPCOMING-AUTO-START` and `UPCOMING-AUTO-END` so post-publish automation can reset that block via PR. Notes **above** the block are not auto-cleared.
22+
3. **Single source**Staging prereleases and main production releases both read the same `X.Y.Z.md` file.
2123
4. **Brevity** — Concise, not a duplicate of git log.
2224

2325
## Naming in CI

.github/workflows/publish-main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ jobs:
103103
const owner = context.repo.owner;
104104
const repo = context.repo.repo;
105105
const fs = require("fs");
106-
const path = "docs/operations/CHANGELOG-UPCOMING.md";
106+
const path = "docs/development/CHANGELOGS/" + base + ".md";
107107
let body;
108108
if (fs.existsSync(path)) {
109109
body = fs.readFileSync(path, "utf8");
110110
} else {
111-
body = "Production build; no " + path + " at this commit.";
111+
body = "Production build; no " + path + " at this commit. Bump version on develop at the start of work and write notes continuously in that file.";
112112
}
113113
try {
114114
await github.rest.git.createRef({

.github/workflows/publish-staging.yml

Lines changed: 3 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,14 @@ jobs:
282282
with:
283283
script: |
284284
const version = "${{ needs.reserve-version.outputs.version }}";
285-
const path = "docs/operations/CHANGELOG-UPCOMING.md";
285+
const baseVersion = version.replace(/-(staging|alpha|beta)\.\d+$/, "");
286+
const path = "docs/development/CHANGELOGS/" + baseVersion + ".md";
286287
const fs = require("fs");
287288
let body;
288289
if (fs.existsSync(path)) {
289290
body = fs.readFileSync(path, "utf8");
290291
} else {
291-
body = "Prerelease; no " + path + " at this commit.";
292+
body = "Prerelease build; no " + path + " at this commit. Bump version on develop at the start of work and write notes continuously in that file.";
292293
}
293294
const tag = version;
294295
const owner = context.repo.owner;
@@ -301,74 +302,3 @@ jobs:
301302
await github.rest.repos.createRelease({
302303
owner, repo, tag_name: tag, name: tag, body, prerelease: true,
303304
});
304-
305-
changelog-pr-to-develop:
306-
needs: [github-prerelease-create, reserve-version, verify-published-tags]
307-
if: success()
308-
runs-on: ubuntu-latest
309-
permissions:
310-
contents: write
311-
pull-requests: write
312-
steps:
313-
- uses: actions/checkout@v6
314-
with:
315-
ref: develop
316-
persist-credentials: false
317-
- name: Write archive and reset UPCOMING markers
318-
uses: actions/github-script@v7
319-
env:
320-
PUBLISH_SHA: ${{ github.sha }}
321-
PUBLISH_VERSION: ${{ needs.reserve-version.outputs.version }}
322-
RUN_ID: ${{ github.run_id }}
323-
REF_NAME: ${{ github.ref_name }}
324-
with:
325-
script: |
326-
const fs = require("fs");
327-
const owner = context.repo.owner;
328-
const repo = context.repo.repo;
329-
const ref = process.env.PUBLISH_SHA;
330-
const version = process.env.PUBLISH_VERSION;
331-
const runId = process.env.RUN_ID;
332-
const refName = process.env.REF_NAME || "unknown";
333-
const label = refName === "main" ? "production" : refName;
334-
const upcomingPath = "docs/operations/CHANGELOG-UPCOMING.md";
335-
let upcoming = "";
336-
try {
337-
const { data } = await github.rest.repos.getContent({ owner, repo, path: upcomingPath, ref });
338-
if (data && data.type === "file" && "content" in data && "encoding" in data && data.encoding === "base64") {
339-
upcoming = Buffer.from(String(data.content).replace(/\n/g, ""), "base64").toString("utf8");
340-
}
341-
} catch (e) {
342-
if (e.status === 404) { upcoming = ""; } else { throw e; }
343-
}
344-
const safe = version.replace(/\./g, "-");
345-
const dir = "docs/operations/CHANGELOG-ARCHIVE";
346-
fs.mkdirSync(dir, { recursive: true });
347-
const head =
348-
"# Release " + version + " (" + label + ")\n\n" +
349-
"From [`" + ref.substring(0, 7) + "`](https://github.com/" + owner + "/" + repo + "/commit/" + ref + "]) — " +
350-
"[workflow run](https://github.com/" + owner + "/" + repo + "/actions/runs/" + runId + ").\n\n";
351-
fs.writeFileSync(dir + "/RELEASE-" + safe + ".md", head + (upcoming || "_(no CHANGELOG-UPCOMING at that commit.)_\n"));
352-
if (fs.existsSync(upcomingPath)) {
353-
let s = fs.readFileSync(upcomingPath, "utf8");
354-
if (s.includes("UPCOMING-AUTO-START") && s.includes("UPCOMING-AUTO-END")) {
355-
s = s.replace(
356-
/<!--\s*UPCOMING-AUTO-START\s*-->[\s\S]*?<!--\s*UPCOMING-AUTO-END\s*-->/m,
357-
"<!-- UPCOMING-AUTO-START -->\n" +
358-
"<!-- Add concise bullets (most important first) for the next significant changes. -->\n" +
359-
"<!-- UPCOMING-AUTO-END -->\n"
360-
);
361-
fs.writeFileSync(upcomingPath, s, "utf8");
362-
}
363-
}
364-
- uses: peter-evans/create-pull-request@v6
365-
with:
366-
token: ${{ secrets.GITHUB_TOKEN }}
367-
commit-message: "chore: archive changelog for ${{ github.ref_name }} ${{ needs.reserve-version.outputs.version }}"
368-
title: "chore: archive changelog for ${{ needs.reserve-version.outputs.version }} (${{ github.ref_name }})"
369-
body: |
370-
Automated follow-up to a successful [publish](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) on `${{ github.ref_name }}`.
371-
base: develop
372-
branch: automation/changelog-${{ github.ref_name }}-${{ needs.reserve-version.outputs.version }}-${{ github.run_id }}
373-
delete-branch: true
374-
signoff: false
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
### Session 1 - 2026-04-23
2+
3+
#### Prompt (Developer)
4+
5+
how are these PRs supposed to work? i think we need a different, and simpler system. instead of using a "recent" file to accumulate changelog, the changelog should simply be written by the LLM continuosly as it goes. to make this work, we will now make it a part of our process to bump the version at the BEGINNING of work, rather than at the end of work. since we bump at the beginning, LLM will know which changelog to write as we go. make sure there are vs code and cursor skills to remind you of this. the change logs should go in their own separate files named after the semver. we do not need separate staging changelogs, these changelogs represent the version number which will eventually be graduated to production anyway
6+
7+
https://github.com/podverse/podverse/pull/154
8+
9+
Start implementation
10+
11+
#### Key Decisions
12+
13+
- Switched from `CHANGELOG-UPCOMING.md` accumulation to semver-named changelog files at `docs/development/CHANGELOGS/X.Y.Z.md`.
14+
- Updated staging and main publish workflows to read release notes from the base semver changelog file.
15+
- Removed staging post-publish changelog archive/reset PR job from publish workflow.
16+
- Updated `scripts/publish/bump-version.sh` to create and stage the semver changelog file during version bump so changelog writing starts immediately.
17+
- Updated publish docs and release-changelog skill guidance to enforce version-first changelog authoring.
18+
- Ran Cursor-to-Copilot sync/check so mirrored `.github` customization files stay aligned with `.cursor` source changes.
19+
20+
#### Files Modified
21+
22+
- .llm/history/active/semver-changelog-workflow/semver-changelog-workflow-part-01.md
23+
- .cursor/skills/release-changelog/SKILL.md
24+
- .github/skills/release-changelog/SKILL.md
25+
- .github/workflows/publish-staging.yml
26+
- .github/workflows/publish-main.yml
27+
- scripts/publish/bump-version.sh
28+
- docs/PUBLISH.md
29+
- docs/operations/CHANGELOG-UPCOMING.md
30+
- docs/operations/CHANGELOG-ARCHIVE/DOCS-OPERATIONS-CHANGELOG-ARCHIVE.md
31+
- docs/development/CHANGELOGS/0.1.10.md
32+
- .github/instructions/*.instructions.md (sync rewrite updates)
33+
- .github/skills/*/SKILL.md (sync rewrite updates)

docs/PUBLISH.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Two workflows cover release artifacts:
1010
| `staging` | Full build + push | `X.Y.Z-staging.N` (N via Git ref API) | `staging` |
1111
| `main` | Promote (crane copy) | `X.Y.Z` (from root `package.json` base) | `prod` |
1212

13-
**Changelog (staging only):** The **staging** workflow reads [`docs/operations/CHANGELOG-UPCOMING.md`](operations/CHANGELOG-UPCOMING.md) on the build commit, creates a **prerelease** GitHub Release, and opens a **PR to `develop`** to append [`CHANGELOG-ARCHIVE/`](operations/CHANGELOG-ARCHIVE/DOCS-OPERATIONS-CHANGELOG-ARCHIVE.md) and clear the `UPCOMING` auto block. See the [release-changelog skill](../.cursor/skills/release-changelog/SKILL.md). The **main** workflow uses `CHANGELOG-UPCOMING` on the promote commit for the RTM release body when present.
13+
**Changelog:** Both **staging** prereleases (`X.Y.Z-staging.N`) and **main** RTM releases (`X.Y.Z`) read release notes from [`docs/development/CHANGELOGS/X.Y.Z.md`](development/CHANGELOGS/). Bump the base version at the start of work with `scripts/publish/bump-version.sh` so the semver changelog file exists immediately, then update that file continuously as work lands.
1414

1515
**Promotion:** all product changes land on **`develop`**. **Promotion branches** (mirrors) are: **`sync-develop-to-staging.sh`**, **`sync-develop-to-main.sh`**. There is no **`beta`** publish line.
1616

@@ -30,7 +30,7 @@ Pre-release image tags use **`X.Y.Z-staging.N`** and a floating **`:staging`** s
3030

3131
## What the staging branch is for
3232

33-
The **`staging`** branch is the preprod build line. Default development branch remains **`develop`**. When you fast-forward `staging` from `develop` (or run **Publish (staging)** via **Run workflow** on a chosen ref), the GitHub Action validates, reserves `X.Y.Z-staging.N`, builds images, pushes to GHCR, verifies tags, creates a matching **Git tag**, and creates/updates a **prerelease GitHub Release** (see [CHANGELOG-UPCOMING](operations/CHANGELOG-UPCOMING.md)).
33+
The **`staging`** branch is the preprod build line. Default development branch remains **`develop`**. When you fast-forward `staging` from `develop` (or run **Publish (staging)** via **Run workflow** on a chosen ref), the GitHub Action validates, reserves `X.Y.Z-staging.N`, builds images, pushes to GHCR, verifies tags, creates a matching **Git tag**, and creates/updates a **prerelease GitHub Release** from `docs/development/CHANGELOGS/X.Y.Z.md`.
3434

3535
No Kubernetes manifests are applied from this repo to remote clusters. Clusters consume image pins from your **GitOps** repository (e.g. Argo CD `Application` `targetRevision`, Kustomize `newTag`).
3636

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog 0.1.10
2+
3+
_Update this file continuously during development for version 0.1.10._
4+
5+
## Highlights
6+
7+
- Migrate changelog process to semver-named files and version-first authoring.

docs/operations/CHANGELOG-ARCHIVE/DOCS-OPERATIONS-CHANGELOG-ARCHIVE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Archived release notes (generated)
22

3+
> Deprecated: release notes now come directly from `docs/development/CHANGELOGS/X.Y.Z.md` files.
4+
35
This directory is populated by automation after a successful publish (GitHub Actions) from `alpha`, `beta`, or `main`.
46

57
Each `RELEASE-*.md` archives [CHANGELOG-UPCOMING.md](../CHANGELOG-UPCOMING.md) as of the build commit, with metadata.

0 commit comments

Comments
 (0)