release-train

A command for carrying out a planned release made of several dependent pull requests. A pull request is a proposed code change for review; stacked pull requests are arranged so each one builds on the previous one.

In plain words
What is it for?
Use it to execute an approved release plan with separate, single-purpose pull requests, monitor CI, rebase when conflicts occur, and ship changes in dependency order.
Why use it?
It coordinates branches, continuous-integration checks, conflicts, and release order for a multi-part change. It stops when required planning or approval conditions are missing.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/naimkatiman/continuous-improvement/release-train
Clone the repo
git clone --depth 1 https://github.com/naimkatiman/continuous-improvement
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,143 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00060 $0.01143
Opus 5 $0.00030 $0.00571
Sonnet 5 $0.00012 $0.00229
Haiku 4.5 $0.00006 $0.00114

Measured 3d ago against content hash 160f391be452, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

release-train scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/release-train.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/release-train

Long-running autonomous orchestrator for stacked-PR rollouts. Driven by the user's session report (1,218 messages, 178 sessions): the audit-then-execute pattern landed at fully_achieved when sessions opened with a stacked-PR plan; sessions that started as big-bang multi-file edits landed at partially_achieved.

This command formalizes the pattern. It does NOT bypass branch protection, force-push, or merge unreviewed PRs.

Preconditions

Before invoking this command:

  1. A RELEASE_PLAN.md (or docs/plans/YYYY-MM-DD-<slug>.md) exists in the repo with a per-PR table, dependency graph, worktree-per-PR, and out-of-scope list. Per the Stacked-PR Plan Precondition in the unified /superpowers dispatcher.
  2. The plan was reviewed and explicitly approved by the operator.
  3. The base branch (main) is clean and up to date with origin/main.
  4. CI is green on origin/main.

If any precondition fails, this command halts and reports what is missing rather than improvising.

Behavior

For each PR in the plan, in dependency order:

  1. Worktreegit worktree add -b <branch> ../<branch> origin/main (or off the previous PR's branch when the dependency requires it).
  2. Implement — TDD-first per superpowers:test-driven-development: failing test, watch it fail, write minimal code, watch it pass, commit.
  3. Verifysuperpowers:verification-before-completion before claiming done. Smallest check that proves correctness.
  4. Review — dispatch a fresh subagent for spec-compliance + code-quality two-stage review per superpowers:subagent-driven-development. Critical findings block progress.
  5. Open PRgh pr create --base <base-of-this-PR> --head <branch> with single-concern description that cites the plan doc.
  6. Wait for CI — poll until green. Auto-rebase on conflicts (max 2 attempts; halt on third).
  7. Address reviewsuperpowers:receiving-code-review to walk reviewer comments. Critical findings produce a fix commit; non-critical are logged on the PR.
  8. Merge when green and approved — never bypass branch protection. If branch protection blocks, post a status comment and continue with the next independent PR.
  9. Deploy receipt — when the merged branch is on an auto-deploy target, run deploy-receipt to verify deployed SHA matches merge SHA + healthcheck 200 before reporting the PR as done.

Read the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 82 lines · 60 tokens per session scan A 160f391be452

Subscribe to this mod's changes

release-train is a command published in the GitHub repository naimkatiman/continuous-improvement (7 stars, last pushed 8d ago), licensed MIT. It adds 60 tokens to every session and 1,143 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.