🔨 (chore) [NO-ISSUE]: Add agent-driven release scripts and skill#1424
🔨 (chore) [NO-ISSUE]: Add agent-driven release scripts and skill#1424aussedatlo wants to merge 4 commits intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
ec96ee8 to
5edd02b
Compare
5edd02b to
7cacc1a
Compare
There was a problem hiding this comment.
Pull request overview
This PR replaces the deprecated ldmk-tool release workflow with an agent-driven release flow implemented as Cursor scripts under .cursor/scripts/release/ and documented as a Cursor skill.
Changes:
- Added a new scripted release pipeline (preflight → discover → set-private → pin-deps → bump → changelog → cleanup → create-pr + revert/unpin helpers).
- Removed legacy
ldmk-toolrelease commands/scripts and updated docs/templates to reference the new flow. - Moved Cursor hook scripts to
.cursor/scripts/hooks/and updated.cursor/hooks.jsonaccordingly.
Reviewed changes
Copilot reviewed 23 out of 26 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Lockfile updates reflecting dependency graph changes (notably ldmk-tool deps). |
| packages/tools/ldmk-tool/release.cjs | Removed legacy enter/exit release workflow script. |
| packages/tools/ldmk-tool/package.json | Dropped semver dependency from ldmk-tool. |
| packages/tools/ldmk-tool/create-release-pr.cjs | Removed legacy release PR creation script. |
| packages/tools/ldmk-tool/cli.cjs | Removed legacy release-related CLI commands (enter-release, exit-release, bump, create-release-pr). |
| packages/tools/ldmk-tool/bump.cjs | Removed legacy changeset bump script. |
| package.json | Removed obsolete commitcl helper script. |
| README.md | Added a “Release” section pointing to the Cursor skill/scripts and release PR template. |
| AGENTS.md | Documented Cursor skills/commands/rules/hooks and sandbox permission notes. |
| .github/pull_request_release_template.md | Updated release PR template (package sections + checklist references new Cursor scripts). |
| .github/pull_request_backmerge_template.md | Updated backmerge template to use new revert/unpin scripts. |
| .cursor/skills/release/SKILL.md | Added the release skill documentation describing the step-by-step release process. |
| .cursor/scripts/release/unpin-deps.cjs | New script to restore internal deps back to workspace:^. |
| .cursor/scripts/release/set-private.cjs | New script to toggle private flags and auto-include major-bump dependents (with a generated changeset). |
| .cursor/scripts/release/revert-private.cjs | New script to revert private:true back to private:false for workspace packages. |
| .cursor/scripts/release/preflight.cjs | New preflight checks for tooling/auth availability before running the release flow. |
| .cursor/scripts/release/pin-deps.cjs | New script to pin internal workspace deps to concrete versions for non-released internal packages. |
| .cursor/scripts/release/discover.cjs | New script to output workspace package + changeset metadata as JSON for confirmation. |
| .cursor/scripts/release/create-pr.cjs | New script to generate a release PR with version summary and open it via gh. |
| .cursor/scripts/release/config.cjs | New shared release configuration (aliases, display names, workspace package discovery, changeset parsing/enrichment). |
| .cursor/scripts/release/cleanup.cjs | New script to delete consumed changeset files for packages in the release set. |
| .cursor/scripts/release/changelog.cjs | New script to generate/update package changelogs using changeset metadata enriched via GitHub API. |
| .cursor/scripts/release/bump.cjs | New script to compute/apply semver bumps and propagate patch bumps to dependents. |
| .cursor/scripts/hooks/post-task-checks.cjs | Moved/added hook to run package-local tests/lint/typecheck after agent tasks. |
| .cursor/scripts/hooks/format.cjs | Moved/added hook to auto-format edited files with Prettier. |
| .cursor/hooks.json | Updated hook command paths to the new .cursor/scripts/hooks/ location. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dee302e to
3aee4cf
Compare
3aee4cf to
2151fd7
Compare
2151fd7 to
287bf9f
Compare
Introduce agent skills orchestrating the release and backmerge flows, backed by dedicated scripts under .cursor/scripts/release/. Move editor hooks under .cursor/scripts/hooks/ and document the new skills, hooks, and sandbox requirements in AGENTS.md. Made-with: Cursor
…e skill Delete enter-release, exit-release, bump, and create-release-pr commands along with their implementation files. The release flow is now driven by the agent release skill and its dedicated scripts. Made-with: Cursor
Update the signer generator to add the new package to the release configuration so it is picked up by the release skill automatically. Made-with: Cursor
Align the release and backmerge PR templates with the new skill-driven flow, document the skills in the README, add the semver dependency, and normalize pnpm-workspace catalog formatting. Made-with: Cursor
75807ba to
103e487
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 26 out of 29 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } catch (err) { | ||
| throw new Error(`Failed to fetch PR metadata for commit ${sha}. Is gh authenticated?\n${err.message}`); | ||
| } | ||
| const data = JSON.parse(result.stdout.trim()); |
There was a problem hiding this comment.
gh api ... --jq '.[0] | ...' can legitimately output null (e.g., if a commit isn’t associated with a PR), and JSON.parse('null') returns null, so data.number will throw a TypeError. Handle empty/null output explicitly and raise a clear error (or allow changelog entries without PR metadata).
| const data = JSON.parse(result.stdout.trim()); | |
| const output = result.stdout.trim(); | |
| if (!output || output === "null") { | |
| throw new Error(`No PR metadata found for commit ${sha}. The commit may not be associated with a pull request.`); | |
| } | |
| let data; | |
| try { | |
| data = JSON.parse(output); | |
| } catch (err) { | |
| throw new Error(`Failed to parse PR metadata for commit ${sha}: ${err.message}`); | |
| } | |
| if (!data || typeof data !== "object") { | |
| throw new Error(`Invalid PR metadata for commit ${sha}: ${output}`); | |
| } |
| // Insert into ALIASES: find the last "signer-*" line that sorts before ours or before "signer-utils" | ||
| const aliasLines = releaseConfigContent.match(/^ {2}"signer-[^"]*":.*$/gm) || []; | ||
| let aliasInsertAfter = null; | ||
| for (const line of aliasLines) { | ||
| const key = line.match(/"(signer-[^"]+)"/)?.[1]; | ||
| if (key && key < aliasKey) { | ||
| aliasInsertAfter = line; | ||
| } | ||
| } | ||
| if (aliasInsertAfter) { | ||
| const newAliasLine = ` "${aliasKey}": "${fullPkgName}",`; | ||
| releaseConfigContent = releaseConfigContent.replace( | ||
| aliasInsertAfter, | ||
| `${aliasInsertAfter}\n${newAliasLine}` | ||
| ); | ||
| } |
There was a problem hiding this comment.
If aliasInsertAfter is not found (e.g., the new alias sorts before all existing signer-* keys), nothing is inserted into config.cjs, but the script still writes the file and prints a success message. Add a fallback insertion strategy (e.g., insert after the opening { of ALIASES / DISPLAY_NAMES, or append before the closing }) and only print success when an insertion actually occurred.
|



📝 Description
Replace the obsolete
ldmk-toolrelease commands with a new set of agent-driven release scripts under.cursor/scripts/release/and a Cursor skill (.cursor/skills/release/SKILL.md) that orchestrates the full release flow.Changes:
preflight,discover,bump,changelog,pin-deps,set-private,create-pr,revert-private,unpin-deps,cleanupSKILL.md) documenting the step-by-step release processAGENTS.mdwith skill/command/rule/hook documentationldmk-toolrelease scripts (release.cjs,bump.cjs,create-release-pr.cjs,cli.cjs).cursor/scripts/hooks/❓ Context
✅ Checklist
.cursor/,.github/,packages/tools/ldmk-tool/)AGENTS.mdandREADME.mdupdatedldmk-toolrelease commands removedMade with Cursor