| 1 | # Releasing Diffinery |
| 2 | |
| 3 | This is the playbook for cutting a Diffinery release. Follow it step by step, whether you |
| 4 | are a maintainer or an AI agent preparing the release for one. |
| 5 | |
| 6 | Diffinery is deployed continuously: every merge to `main` that passes CI deploys |
| 7 | diffinery.com. A release doesn't deploy anything. It names a point on `main` that |
| 8 | self-hosters can deploy, with a changelog, a tag and a GitHub release. |
| 9 | |
| 10 | ## What a release contains |
| 11 | |
| 12 | - A `## [X.Y.Z] - YYYY-MM-DD` section in [CHANGELOG.md](../CHANGELOG.md). |
| 13 | - The new version in every file listed in [Bump the version](#4-bump-the-version). |
| 14 | - Docs, README, ROADMAP and CITATION brought up to date with what shipped. |
| 15 | - A tag `vX.Y.Z` on `main` and a GitHub release at |
| 16 | https://github.com/codician-team/diffinery/releases with the release notes. |
| 17 | |
| 18 | The editor extensions (`apps/vscode`, `apps/jetbrains`) and the plugins (`plugins/`) have |
| 19 | versions of their own. They are released when they change, not with every Diffinery |
| 20 | release. See [Extensions and plugins](#extensions-and-plugins). |
| 21 | |
| 22 | ## Who does what |
| 23 | |
| 24 | - **An agent or a contributor** prepares the release pull request: steps 1 to 7. |
| 25 | - **A maintainer** (write access on `codician-team/diffinery`) merges it and publishes the |
| 26 | tag and the GitHub release: steps 8 and 9. |
| 27 | |
| 28 | Agents: never create a tag or a GitHub release, and never push to `main`, without a |
| 29 | maintainer's go-ahead in the conversation for that release. |
| 30 | |
| 31 | ## Choosing the version |
| 32 | |
| 33 | Diffinery is at `0.y.z`, so: |
| 34 | |
| 35 | - **Minor** (`0.2.0` → `0.3.0`): new features, new settings, new D1 migrations, or anything a |
| 36 | self-hoster must act on (a new secret, a renamed setting, a changed default). |
| 37 | - **Patch** (`0.2.0` → `0.2.1`): fixes and docs only, no migrations and no new settings. |
| 38 | |
| 39 | Once Diffinery reaches `1.0.0`, a change that breaks an existing instance, API client or |
| 40 | workflow needs a major version. |
| 41 | |
| 42 | ## 1. Find what changed |
| 43 | |
| 44 | Start from an up-to-date `main`: |
| 45 | |
| 46 | ```sh |
| 47 | git fetch origin --tags |
| 48 | PREV=$(git describe --tags --abbrev=0 origin/main) # the last release, such as v0.1.0 |
| 49 | git log --no-merges --format='%h %s' "$PREV"..origin/main |
| 50 | ``` |
| 51 | |
| 52 | Then look for what self-hosters must know: |
| 53 | |
| 54 | ```sh |
| 55 | git diff --name-only "$PREV"..origin/main -- apps/diffinery/migrations # new D1 migrations |
| 56 | git diff "$PREV"..origin/main -- apps/diffinery/src/env.ts apps/diffinery/wrangler.jsonc # new settings and bindings |
| 57 | git diff --stat "$PREV"..origin/main -- apps/diffinery/docs # docs that already changed |
| 58 | ``` |
| 59 | |
| 60 | Leave out changes that only touch tests, CI of this repository or internal scripts, unless |
| 61 | they change how people deploy or contribute. |
| 62 | |
| 63 | ## 2. Branch |
| 64 | |
| 65 | ```sh |
| 66 | git switch -c release/vX.Y.Z origin/main |
| 67 | ``` |
| 68 | |
| 69 | ## 3. Write the changelog |
| 70 | |
| 71 | In [CHANGELOG.md](../CHANGELOG.md): |
| 72 | |
| 73 | 1. Add `## [X.Y.Z] - YYYY-MM-DD` (today's date, UTC) below `## [Unreleased]`, and move |
| 74 | anything under `[Unreleased]` into it. Keep `## [Unreleased]` empty above it. |
| 75 | 2. Open with one or two sentences on what the release is about. |
| 76 | 3. Group entries under the headings the earlier releases use: **Actions (CI/CD)**, **Git |
| 77 | hosting and collaboration**, **AI agents and integrations**, **Self-hosting**, and |
| 78 | **Changed**, **Removed** or **Security** when there are such entries. Leave out empty |
| 79 | groups. |
| 80 | 4. Write each entry for the person who uses or runs Diffinery: what they can do now, with |
| 81 | the exact names of buttons, settings, endpoints and flags. One line per change, not one |
| 82 | per commit. |
| 83 | 5. Under **Self-hosting**, name every new setting, secret and binding, and say if the |
| 84 | update needs anything beyond running Deploy or `scripts/setup.sh`. |
| 85 | 6. Update the links at the bottom: |
| 86 | |
| 87 | ``` |
| 88 | [Unreleased]: https://github.com/codician-team/diffinery/compare/vX.Y.Z...HEAD |
| 89 | [X.Y.Z]: https://github.com/codician-team/diffinery/compare/vPREV...vX.Y.Z |
| 90 | ``` |
| 91 | |
| 92 | ## 4. Bump the version |
| 93 | |
| 94 | The Worker, the CLI, the runner and the packages share one version. Change it in: |
| 95 | |
| 96 | | File | What | |
| 97 | | --- | --- | |
| 98 | | `apps/diffinery/package.json` | `"version"` | |
| 99 | | `apps/cli/package.json` | `"version"` | |
| 100 | | `apps/cli/src/version.ts` | `VERSION`, which `diffinery --version` prints and the docs show | |
| 101 | | `containers/runner/package.json` | `"version"` | |
| 102 | | `packages/git-core/package.json`, `packages/shared/package.json`, `packages/workflow-yaml/package.json` | `"version"` | |
| 103 | | `apps/diffinery/src/mcp/server.ts` | `serverInfo.version` of the MCP server | |
| 104 | | `apps/diffinery/docs/agents/mcp.md` | the two `serverInfo` examples | |
| 105 | | `CITATION.cff` | `version` and `date-released` | |
| 106 | |
| 107 | Then check that nothing still names the old version, apart from the changelog, tests and |
| 108 | examples: |
| 109 | |
| 110 | ```sh |
| 111 | git grep -n "OLD.VERSION" -- ':!pnpm-lock.yaml' ':!CHANGELOG.md' |
| 112 | ``` |
| 113 | |
| 114 | ## 5. Update the docs and the README |
| 115 | |
| 116 | Features ship with their docs (see [AGENTS.md](../AGENTS.md)), so most pages are already |
| 117 | current. Check the rest: |
| 118 | |
| 119 | - **Docs** in `apps/diffinery/docs`: every user- or admin-visible change from step 1 has a |
| 120 | page that describes it. Fix any that doesn't. Differences from GitHub go in |
| 121 | `actions/compatibility.md`. The version example in `self-hosting/deploy.md` under |
| 122 | **Updating** names the new tag. |
| 123 | - **README.md**: the sections *Who Diffinery is for*, *Why Diffinery*, *Plugins and |
| 124 | integrations*, *Features*, *Self-host on your own Cloudflare account*, *How it runs on |
| 125 | Cloudflare*, *What Diffinery doesn't do (yet)* and *FAQ*. Add what's new, remove gaps that |
| 126 | are closed, and update numbers such as the count of MCP tools and the `git checkout` |
| 127 | tag in *Self-host*. |
| 128 | - **ROADMAP.md**: move anything that now works from *Known gaps* to *Works today*. |
| 129 | - **Product pages** in `apps/diffinery/site` (`features.md`, `faq.md`, `compare/*.md`) for |
| 130 | anything the README changed. |
| 131 | - **CITATION.cff**: the `abstract` if what Diffinery is has changed. |
| 132 | |
| 133 | Keep the style: short sentences, exact names, no marketing words. |
| 134 | |
| 135 | ## 6. Check |
| 136 | |
| 137 | ```sh |
| 138 | pnpm install |
| 139 | pnpm -r build |
| 140 | pnpm -r typecheck |
| 141 | pnpm -r test |
| 142 | ``` |
| 143 | |
| 144 | All four must pass. Never skip or disable a test to get green. |
| 145 | |
| 146 | ## 7. Open the pull request |
| 147 | |
| 148 | Commit everything in one commit and open one pull request against `main` on GitHub: |
| 149 | |
| 150 | - Title: `Release vX.Y.Z`. |
| 151 | - Description: the changelog section, the version, and the person you work for. |
| 152 | |
| 153 | ## 8. Merge and wait for the deploy |
| 154 | |
| 155 | A maintainer squash-merges the pull request. Wait until **CI** and **Deploy** on `main` |
| 156 | are green for the merge commit, so the tag points at a commit that is live on |
| 157 | diffinery.com. |
| 158 | |
| 159 | ```sh |
| 160 | git fetch origin |
| 161 | SHA=$(git rev-parse origin/main) # the merge commit of the release pull request |
| 162 | gh run list -R codician-team/diffinery --commit "$SHA" |
| 163 | ``` |
| 164 | |
| 165 | ## 9. Tag and publish the GitHub release |
| 166 | |
| 167 | Write the release notes to a file, `notes.md`, outside the repository. Use the shape of |
| 168 | the earlier releases: |
| 169 | |
| 170 | 1. One paragraph: what Diffinery is, and what this release is about. |
| 171 | 2. The links line: |
| 172 | `**[Deploy your own](https://diffinery.com/docs/self-hosting/deploy)** · **[Documentation](https://diffinery.com/docs)** · **[Changelog](https://github.com/codician-team/diffinery/blob/main/CHANGELOG.md)**` |
| 173 | 3. `## Highlights`: three to seven bullets, each a bold sentence and one or two sentences |
| 174 | more, with a link to the docs page. |
| 175 | 4. `## Updating`: for existing instances, `git fetch --tags && git checkout vX.Y.Z`, then |
| 176 | `scripts/setup.sh` or Deploy, plus anything the changelog's **Self-hosting** section |
| 177 | asks for (new secrets, settings, migrations). |
| 178 | 5. `## Known gaps`: copied from ROADMAP.md's *Known gaps*, shortened. |
| 179 | 6. The full list: a link to the version's section of CHANGELOG.md, such as |
| 180 | `https://github.com/codician-team/diffinery/blob/main/CHANGELOG.md#020---2026-10-31` for |
| 181 | `## [0.2.0] - 2026-10-31`. |
| 182 | |
| 183 | Then create the tag and the release in one step: |
| 184 | |
| 185 | ```sh |
| 186 | gh release create vX.Y.Z -R codician-team/diffinery --target "$SHA" \ |
| 187 | --title "Diffinery vX.Y.Z: <what the release is about>" --notes-file notes.md --latest |
| 188 | ``` |
| 189 | |
| 190 | Check that: |
| 191 | |
| 192 | - https://github.com/codician-team/diffinery/releases/tag/vX.Y.Z shows the notes, marked |
| 193 | **Latest**. |
| 194 | - `git ls-remote --tags origin vX.Y.Z` prints `$SHA`. |
| 195 | - The compare link in CHANGELOG.md opens. |
| 196 | |
| 197 | If a mistake slips into the notes, edit them with `gh release edit vX.Y.Z --notes-file |
| 198 | notes.md`. Never move a tag that has been published: fix forward with a patch release. |
| 199 | |
| 200 | ## Extensions and plugins |
| 201 | |
| 202 | Check whether these changed since the last release: |
| 203 | |
| 204 | ```sh |
| 205 | git diff --stat "$PREV"..origin/main -- apps/vscode apps/jetbrains plugins |
| 206 | ``` |
| 207 | |
| 208 | - **VS Code, Cursor, Windsurf extension**: bump `version` in `apps/vscode/package.json`, |
| 209 | add an entry to `apps/vscode/CHANGELOG.md`, and publish to the marketplaces as described |
| 210 | in [apps/vscode/PUBLISHING.md](../apps/vscode/PUBLISHING.md). |
| 211 | - **JetBrains plugin**: bump `pluginVersion` in `apps/jetbrains/gradle.properties` and add |
| 212 | an entry to `apps/jetbrains/CHANGELOG.md`. |
| 213 | - **Claude Code and Codex plugins**: bump the plugin's version in its manifests and in both |
| 214 | marketplace files, pack it with `python3 scripts/pack-plugins.py <name>`, and replace its |
| 215 | zip in `apps/diffinery/claude-plugins`, as described in |
| 216 | [apps/diffinery/claude-plugins/README.md](../apps/diffinery/claude-plugins/README.md). |
| 217 | |
| 218 | Their changes can go in the release pull request or in one of their own before it. Mention |
| 219 | them in the release notes when people should update. |