Skip to content
Back to skills

Release Train

ASecurity

Use when cutting a lean-agents release: one release per session, start to finish, with the same gated steps.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 28, 2026
ai-agentsrustshellbashnodegitapisecurity

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Scanned November 29, 2026

npx -y skills add estebanmr99/lean-agents --skill release-train --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Release Train?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Release Train
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/estebanmr99-release-train/badge)](https://www.skillsdirectory.com/skills/estebanmr99-release-train)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: release-train
description: Use when cutting a lean-agents release: one release per session, start to finish, with the same gated steps.
---

Run one release per session. Read the private details (models, budget, workspace
paths) from the agent's memory at run time; this skill holds only the generic steps.

## Steps

1. Start: read pending-status, the latest retro, who-builds and SPEC 0/2; run `date -u`. Check: each milestone has ≤5 open issues and the UTC date is noted.
2. Preflight: provider smoke test + parsed 30-day spend logged. Check: the smoke file says OK and a total is printed, otherwise stop.
3. Spec per issue: task first, rules last (local gate incl. Node 22, `[\\/]` in path regexes, a test per finding, no main checkout); the worker done gate runs `npm test` on Node 22 in a hermetic env (only PATH, HOME, NVM_DIR), expected paths in tests use path.join/path.sep, never a literal '~/' or '~\', and any new external CLI flag cites its minimum version from docs/compatibility.md in the PR body. Check: one spec file per issue.
4. Launch: one worktree + terminal per issue from `origin/main`. Check: each worktree HEAD equals the main SHA.
5. Watch: one batch monitor (PR opened, worker exit/error prefix, CI done). Check: no stray watchers; a dead worker is cleaned up within 1 h.
6. Verify PR: HEAD equals PR head, read the diff, `npm ci && npm test` on default Node and Node 22, `bash scripts/check-private.sh`. Check: counts posted in a PR comment; never paste private memory details (models, budgets, paths) into PR comments or issues.
7. Review: code, security (cwd/PATH), PO vs "Done when"; the header carries `date -u` + SHA; a different model for data-sensitive PRs. Check: 3 verdicts recorded; the security reviewer rejects a PR that adds an external CLI flag without its minimum-version line.
8. Fix round: all findings in one worker message; each MEDIUM+ finding gets a test that fails on the pre-fix SHA; same-agent re-review. Check: re-review approves and names the tests; before writing a fix spec for a CI-only failure the coordinator reproduces it on `origin/main` in a clean temp HOME on Node 22 and quotes the failing line.
9. Coordinator edits only conflicts, release/docs and assertion-keeping harness fixes; each one is re-reviewed; no spec branches on the Node version and "never narrow an assertion" also covers the specs the coordinator writes. Check: a PR comment lists the coordinator commits + the reviewer's OK.
10. Merge gate: required checks green on the head SHA (a known flake is rerun once, with an issue filed), findings ledger complete, REST squash merge. Check: merge API message + ledger comment.
11. Cleanup + carry-over: close the terminal, remove the worktree, move leftovers with a comment, update pending-status. Check: `git worktree list` is clean and milestones are ≤5.
12. Release PR in a worktree: fold fragments with `node scripts/changelog.mjs <version>`, version bumps, security audit of the range, PO review. Check: `npm test`, `node scripts/lint-workflows.mjs`, `shellcheck install.sh scripts/*.sh tests/*.sh`, `bash scripts/check-private.sh`, and `node scripts/release.mjs <version>` all exit 0, and no pin in `core/pins.json` is older than the previous release.
13. Publish: main `ci.yml` green on the SHA, owner approves the tag, `.github/workflows/release.yml` runs on the `v*` tag push (gates: tagged commit is an ancestor of `origin/main`, `npm ci`, `npm test`, `bash scripts/check-private.sh`, `npm ci --omit=dev`, `node scripts/release.mjs <version>`), `publish` creates the GitHub release with `--verify-tag`, and `npm` publishes with OIDC provenance when `NPM_PUBLISH == 'true'` after owner approval on the `npm` environment. Check: `npm view lean-agents version` shows the new version as latest with provenance; the record PR updating `docs/SPEC.md` and `docs/ROADMAP.md` is open.
14. Clean up: remove every merged worktree, every local and remote branch whose PR is merged or closed, worker logs and temp HOMEs; archive specs and retro notes outside the repo tree. Check: `git worktree list` shows only main, `git branch` shows only main, and no remote branch has a merged PR.
15. Site and listing: update the project site and the public listings with the new version and highlights (after the site issue lands). Check: the live site shows the new version.
16. Retro: condense the transcript; 2 reviewers on different models write independently, then debate. Check: `retro-<date>.md` with apply-now / repo issues / rejected / keep.
17. Next-session prompt: top-risk repo issues first, saved in pending-status and given to the owner; end the session. Check: the prompt names the issues, the first step and the budget read from the agent's memory at run time.

## Checks and scripts

- Local pre-release checks: `npm test`, `node scripts/lint-workflows.mjs`, `shellcheck install.sh scripts/*.sh tests/*.sh`, `bash scripts/check-private.sh`.
- `node scripts/changelog.mjs <version>` folds `changes/<issue>.md` fragments into `CHANGELOG.md`.
- `node scripts/release.mjs <version>` builds release artifacts (`dist/*.tgz`, `*.tar.gz`, `*.zip`, `SHA256SUMS`, `install.sh`, `install.ps1`, `notes.md`).
- `.github/workflows/release.yml` (triggered by pushing a `v*` tag) gates the release: `build` verifies the tagged SHA is an ancestor of `origin/main`, runs `npm ci`, `npm test`, `bash scripts/check-private.sh`, `npm ci --omit=dev`, and `node scripts/release.mjs <version>` and uploads `dist/`; `publish` runs no repo code and creates the GitHub release with `--verify-tag`; `npm` publishes the `.tgz` with `--provenance --access public` via OIDC trusted publishing when `vars.NPM_PUBLISH == 'true'` after `npm` environment approval.

## Shell traps

- Launch workers with `bash -c`; zsh does not word-split an unquoted `$spec`.
- Start watchers only as background tasks of the agent harness; `nohup` or `& disown` never notify.
- `git add` new docs before running the link test; it reads tracked files only.
- A flaky test gets one rerun plus an issue.
- `timeout` is not on macOS by default.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.