Release Orchestrator

SkillDev tools

Use when releasing @haklex/* packages or propagating published haklex versions into Yohaku, mx-core, mx-space, or related downstream consumers.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Release Orchestrator skill

What this skill tells your AI

The instructions your AI receives, as published by innei/haklex in .claude/skills/release-orchestrator/SKILL.md and read by ahel’s review.

End-to-end release procedure for the shared-version @haklex/* package family. This skill supersedes .claude/commands/release.md.

Operating Contract

RuleRequirement
AutonomyInfer release metadata from repository state. Do not ask for package lists, semver level, downstream branch, or confirmation unless a stop condition is reached.
VersioningAll @haklex/* packages share one version, read from packages/rich-editor/package.json.
Default modeUse incremental unless invocation text contains full, 全量, or standalone all, or unless semver classification reaches major.
Publish setIn incremental, publish the tri-directional closure of changed packages, not merely CHANGED_PKGS.
Peer safetyTreat duplicate runtime copies of lexical, React, lucide-react, shiki, and @lexical/* as release-blocking defects.
DownstreamUpdate downstream default branches directly after validation. Do not open PRs unless direct push is blocked and the user confirms the fallback.
Destructive actionsDo not discard, reset, restore, force-remove, or silently overwrite user-owned changes. Preserve state and ask before destructive recovery.

Required Reading Order

Read the relevant reference files before acting. If performing a full release, read all of them.

StageReference
Repository and downstream layoutreferences/repo-layout.md
Release mode, change detection, semver, peer auditreferences/release-analysis.md
Publish-set closure, build, publish, registry polling, CLI smokereferences/publish-pipeline.md
GitHub release, downstream propagation, third-party pin reconciliation, smoke testsreferences/downstream-propagation.md
Stop conditions, safe recovery, common mistakes, real-world anchorsreferences/failure-recovery-and-anchors.md

Execution Flow

flowchart TD
  A[Clean haklex worktree] --> B[Find last release]
  B --> C[Detect mode and changed packages]
  C --> D{No releasable trigger?}
  D -->|Yes| Z[Stop: report no package diff]
  D -->|No| E[Classify shared semver bump]
  E --> F{Major bump?}
  F -->|Yes| G[Switch to full mode]
  F -->|No| H[Keep selected mode]
  G --> I[Peer dependency audit]
  H --> I
  I --> J[Compute publish set]
  J --> K[Bump and build all packages]
  K --> L[Publish selected set in topo order]
  L --> M[Registry poll and CLI smoke]
  M --> N[Commit, tag, push haklex]
  N --> O[Publish GitHub release]
  O --> P[Update downstream worktrees]
  P --> Q[Install, dedup gate, typecheck, build, smoke]
  Q --> R{All downstream green?}
  R -->|Yes| S[Push downstream default branches]
  R -->|No| T[Stop with preserved failure state]

Helper Scripts

Scripts are advisory automation for repeatable checks. They do not replace judgment, and they do not edit files destructively.

ScriptPurpose
scripts/release-context.shDerive LAST, local version, source changes, peer-drift triggers, catch-up triggers, and CHANGED_PKGS.
scripts/peer-audit.shDetect always-peer libraries under dependencies, internal @haklex/* peer pins using workspace:*, and divergent third-party peer floors.
scripts/publish-set.shCompute PUBLISH_SET for full or tri-directional incremental mode.
scripts/registry-peer-floors.shAggregate non-@haklex/* peer floors from published registry manifests.
scripts/downstream-dispatch.shEmit downstream manifest rewrite rows for @haklex/* pins and third-party peer-floor reconciliation.
scripts/duplicate-runtime-invariant.shAssert a single resolved version for runtime-anchored libraries in a downstream worktree.

Phase Index

PhaseActionPrimary Reference
0.5Detect incremental vs full moderelease-analysis.md
1Pre-flight and releasable trigger detectionrelease-analysis.md
2Shared semver classificationrelease-analysis.md
3Peer dependency auditrelease-analysis.md
4Build, publish-set closure, topological publish, registry pollingpublish-pipeline.md
4.5@haklex/rich-litexml-cli binary smokepublish-pipeline.md
5Commit, tag, and push haklex release commitpublish-pipeline.md
5.5Publish GitHub releasedownstream-propagation.md
6Downstream worktrees, pin rewrites, peer-floor reconciliationdownstream-propagation.md
7Downstream smoke tests and duplicate-runtime invariantdownstream-propagation.md
8Failure handling or direct downstream pushfailure-recovery-and-anchors.md
9Final summaryfailure-recovery-and-anchors.md

Non-Negotiable Checks

CheckCommand / Script
Last release SHAgit log --grep='^release: v' -n1 --format=%H
Context detection./.claude/skills/release-orchestrator/scripts/release-context.sh
Peer audit./.claude/skills/release-orchestrator/scripts/peer-audit.sh "$LAST"
Publish set./.claude/skills/release-orchestrator/scripts/publish-set.sh "$MODE" "$LAST" $CHANGED_PKGS
Bumppnpm bumpp -r <patch|minor|major> --no-git --no-tag
Buildpnpm run build:packages
Publish one packagepnpm --filter @haklex/<pkg> publish --no-git-checks
Registry polluntil npm view @haklex/<pkg>@$NEW_VERSION version; do sleep 5; done
CLI smokenpx --yes -p @haklex/rich-litexml-cli@$CLI_VER litexml '<p>x</p>' --format json --compact
GitHub releasegh release create "v$NEW_VERSION" --title "v$NEW_VERSION" --notes-file "$NOTE" --verify-tag
Duplicate-runtime gate./.claude/skills/release-orchestrator/scripts/duplicate-runtime-invariant.sh

Stop Conditions

  • Haklex worktree is dirty before release mutation.
  • MODE=incremental but CHANGED_PKGS is empty.
  • No src/** change, no non-@haklex/* peer-range advance, and no registry catch-up trigger.
  • gh is missing or unauthenticated before Phase 5.5.
  • Any package remains unavailable from npm after the registry-poll window.
  • Phase 3 detects internal @haklex/* peerDependencies using workspace:*.
  • Phase 3 detects divergent third-party peer floors across sibling packages.
  • Downstream default branch cannot be derived from origin/HEAD.
  • Downstream rebase conflicts or direct push is rejected.
  • Duplicate-runtime invariant reports more than one resolved version for any runtime-anchored library.
  • Any recovery path would discard, overwrite, reset, restore, or force-delete user-owned changes.

Signals

GitHub stars
36
Forks
6
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
release-orchestrator-innei
Source
github.com/innei/haklex