|
| 1 | +--- |
| 2 | +name: create-roam-release |
| 3 | +description: Create a release for the Discourse Graphs Roam plugin. Use when the user wants to draft or publish a Roam release, generate or update the Roam changelog from Linear issues, trigger the Roam Depot release workflow, or mark merged Roam issues as released. |
| 4 | +--- |
| 5 | + |
| 6 | +Create a release for the Discourse Graphs Roam plugin with version `$ARGUMENTS`. |
| 7 | + |
| 8 | +Follow these steps: |
| 9 | + |
| 10 | +## 1. Validate input |
| 11 | + |
| 12 | +- The argument must be a semver version (for example `0.18.0`). If it is missing or invalid, ask the user. |
| 13 | +- Read `apps/roam/package.json` and confirm the requested version matches the current package version. |
| 14 | +- Read `apps/roam/CHANGELOG.md` and detect whether that version already has an entry. |
| 15 | +- If the version does not match `package.json`, stop and ask the user to resolve the mismatch before continuing. |
| 16 | + |
| 17 | +## 2. Gather Roam release candidates from Linear |
| 18 | + |
| 19 | +Use Linear as the source of truth. The relevant workflow states are `Merged` and `Released`. |
| 20 | + |
| 21 | +### Primary candidates |
| 22 | + |
| 23 | +- Query Engineering issues in the Linear project `Roam Discourse Graph plugin assorted tasks` with state `Merged`. |
| 24 | +- These are the default included issues. |
| 25 | + |
| 26 | +### Spillover candidates |
| 27 | + |
| 28 | +- Query Engineering issues with label `Roam plugin` and state `Merged`. |
| 29 | +- Remove any issue already captured in the primary set. |
| 30 | +- Remove obvious release-ticket items, such as titles like: |
| 31 | + - `Release Roam ...` |
| 32 | + - `Roam Release ...` |
| 33 | + - `release to Roam Depot ...` |
| 34 | +- These issues are not auto-included. Present them separately for explicit user approval. |
| 35 | + |
| 36 | +### Exclusions |
| 37 | + |
| 38 | +- Do not include any issue already in state `Released`. |
| 39 | +- Keep `Chore`, `Documentation`, telemetry-only, build-only, deploy-only, and release-process-only work in a separate review-only excluded list unless the user explicitly asks to include an item. |
| 40 | + |
| 41 | +## 3. Classify the included issues |
| 42 | + |
| 43 | +Build the final changelog from user-facing changes only. |
| 44 | + |
| 45 | +- `Bug` -> `Fixed` |
| 46 | +- Clear new functionality or `Feature` -> `Added` |
| 47 | +- User-facing improvements, UX refinements, behavior changes, and meaningful performance work -> `Changed` |
| 48 | +- Internal-only work -> exclude from the final changelog by default |
| 49 | + |
| 50 | +When labels are incomplete, use the title and description to infer the best category. Prefer concise user-facing wording over reproducing Linear titles verbatim. |
| 51 | + |
| 52 | +## 4. Show the review set before editing files |
| 53 | + |
| 54 | +Before mutating anything, show the user: |
| 55 | + |
| 56 | +- Included primary issues |
| 57 | +- Spillover issues that need approval |
| 58 | +- Excluded internal-only issues |
| 59 | +- A draft changelog entry |
| 60 | + |
| 61 | +Ask the user to confirm: |
| 62 | + |
| 63 | +- Which spillover issues to include |
| 64 | +- Any wording or categorization changes |
| 65 | +- Whether to proceed with updating `apps/roam/CHANGELOG.md` |
| 66 | + |
| 67 | +## 5. Generate the changelog entry |
| 68 | + |
| 69 | +Follow the existing Roam changelog style in `apps/roam/CHANGELOG.md`. |
| 70 | + |
| 71 | +Format: |
| 72 | + |
| 73 | +```md |
| 74 | +## [0.18.0] - 2026-03-29 |
| 75 | + |
| 76 | +### Added |
| 77 | + |
| 78 | +- **Short label** - user-facing description |
| 79 | + |
| 80 | +### Changed |
| 81 | + |
| 82 | +- **Short label** - user-facing description |
| 83 | + |
| 84 | +### Fixed |
| 85 | + |
| 86 | +- **Short label** - user-facing description |
| 87 | +``` |
| 88 | + |
| 89 | +Rules: |
| 90 | + |
| 91 | +- Omit empty sections. |
| 92 | +- Keep entries short and user-facing. |
| 93 | +- Prefer bold lead phrases when they help scanning. |
| 94 | +- If the target version already has an entry, update that entry instead of creating a duplicate. |
| 95 | +- Otherwise prepend the new entry immediately below the changelog header text. |
| 96 | + |
| 97 | +## 6. Edit the changelog |
| 98 | + |
| 99 | +- Update `apps/roam/CHANGELOG.md` only after the user approves the draft. |
| 100 | +- After editing, show the final entry back to the user and ask for one more confirmation before publishing. |
| 101 | + |
| 102 | +## 7. Publish the Roam release |
| 103 | + |
| 104 | +Treat the GitHub Actions workflow as the authoritative publish step. |
| 105 | + |
| 106 | +- Trigger the existing workflow: |
| 107 | + |
| 108 | +```bash |
| 109 | +gh workflow run roam-release.yaml --repo DiscourseGraphs/discourse-graph |
| 110 | +``` |
| 111 | + |
| 112 | +- Then inspect the newest run for that workflow and wait for completion. |
| 113 | +- If the workflow cannot be triggered from the current environment, stop after the changelog update and give the user the exact next manual step instead of switching to a different publish path. |
| 114 | +- Do not fall back to a different release mechanism unless the user explicitly asks for it. |
| 115 | + |
| 116 | +## 8. Mark included issues as sent to Roam for review in Linear |
| 117 | + |
| 118 | +Only after the Roam publish workflow succeeds: |
| 119 | + |
| 120 | +- Move every included issue from `Merged` to `Sent to Roam for Review`. |
| 121 | +- Do not create or update a separate Linear release ticket. |
| 122 | +- Do not change spillover issues the user did not approve. |
| 123 | + |
| 124 | +If publish fails or is skipped, do not move any issues to `Sent to Roam for Review`. |
| 125 | + |
| 126 | +## 9. Final response |
| 127 | + |
| 128 | +Report: |
| 129 | + |
| 130 | +- The final changelog entry |
| 131 | +- Which issues were included |
| 132 | +- Which spillover issues were added or skipped |
| 133 | +- Whether the GitHub Actions release workflow was triggered successfully |
| 134 | +- Which Linear issues were moved to `Sent to Roam for Review` |
| 135 | + |
| 136 | +If publish did not happen, clearly state that the changelog was prepared but Linear release bookkeeping was not applied. |
0 commit comments