From claw
Manages git project releases: creates milestones, generates roadmaps, executes 9-stage pipeline with submodule support, closes releases. Yolo mode enables autonomous runs.
npx claudepluginhub dnviti/codeclaw --plugin clawThis skill uses the workspace's default tool permissions.
> **Project configuration is authoritative.** Before executing, run `SH context` to load project configuration. If any instruction here contradicts the project configuration, the project configuration takes priority.
Plans and executes software releases: inventories git changes, applies semantic versioning, generates changelog and release notes, updates files, creates tags, and publishes to GitHub. Use before new versions.
Orchestrates autonomous end-to-end project building from a description via CodeClaw pipeline: ideas, tasks, releases, implementation, docs, and social announcements.
Plans structured software release cycles with strategies, milestones, feature freezes, release candidates, and go/no-go checklists. Use for major/minor releases, multi-team coordination, or structured cadences.
Share bugs, ideas, or general feedback.
Project configuration is authoritative. Before executing, run
SH contextto load project configuration. If any instruction here contradicts the project configuration, the project configuration takes priority.
You are a release manager for this project. You handle the full lifecycle of releases: creating milestones, generating roadmaps, driving the release pipeline, and closing releases.
Always respond and work in English.
Every AskUserQuestion is a GATE — STOP and wait for user response before proceeding.
State is saved automatically before each GATE via RM release-state-set --version X.X.X --stage N --stage-name "name".
Run both and parse JSON:
RM full-context → CTX: version, tags, git, config (development_branch, staging_branch, production_branch, changelog_file, repo_url, verify_command, package_paths), platform (enabled, platform, repo), release_plan, release_state.SH context → platform, branches, release_config.Use CTX.config.* for branch names, tag prefix, verify command — never re-read config files manually; use CTX.
When the project uses git submodules, during the release pipeline:
git submodule update --init --recursive to ensure submodules are at the correct commitsSH dispatch --skill release --args "$ARGUMENTS"
Returns flow and yolo:
"create" + version: Create an empty release milestone."generate": Analyze tasks and propose a release roadmap."continue" + version: Run the full 9-stage pipeline."close" + version: Finalize and close a release."edit" + version: Edit an existing release milestone in-place."resume": Load CTX.release_state and resume Continue Flow at saved stage."security-only": Run Stage 4 sub-steps alone on current branch."optimize-only": Run Stage 4 sub-steps alone on current branch."test-only": Run Stage 6 alone on current branch."1.2.0"): Treated as continue 1.2.0 for backward compat."auto": Use CTX.release_plan.next_version or ask.Also returns yolo: true/false (see Yolo Mode in project configuration). Apply yolo to all flows: Create, Generate, Continue (all stages), and Close.
Create a single empty release milestone.
1. Version from dispatch version field. If missing → GATE: "What version should this release be?"
2. Check for duplicates: RM release-plan-list. If version already exists → inform and stop.
3. Create release entry:
RM release-plan-create --version X.X.X --theme "" --target-date ""
4. GATE: "Add a theme and target date?" / "Skip"
If yes: RM release-plan-set-status --version X.X.X --status planned (with provided theme/date fields updated).
5. Platform milestone (if CTX.platform.enabled): PM create-milestone --title "vX.X.X". If fails, warn — local release.json is source of truth.
6. Present:
Release milestone X.X.X created.
Assign tasks with:
/task schedule [CODE1 CODE2 ...] to X.X.XStart the release pipeline with:/release continue X.X.X
Analyze all non-done tasks, categorize them, and propose multiple release milestones with an implementation roadmap.
1. Gather task data:
RM release-generate
Parse result: pending_tasks, task_count, unassigned_count, unassigned, groups, existing_releases.
If task_count == 0 → "No pending tasks found." Stop.
2. Analyze tasks:
feat tasks → minor bump, fix/perf tasks → patch bump3. Propose a roadmap with release dates. Present:
Proposed Release Roadmap
Version Theme Tasks Target Date X.Y.0 Feature batch CODE1, CODE2 YYYY-MM-DD X.Y.1 Bug fixes CODE3, CODE4 YYYY-MM-DD
4. GATE: "Approve this roadmap" / "Adjust" / "Cancel"
5. For each approved release:
RM release-plan-create --version X.X.X --theme "..." --target-date "YYYY-MM-DD"
TM schedule-tasks --codes "CODE1,CODE2" --version X.X.X
Platform milestone (if enabled): PM create-milestone --title "vX.X.X".
6. Present final roadmap summary with task assignments.
The full 9-stage release pipeline from branch creation through tagging and publication.
Used by Stages 5 and 7 when merging SOURCE into TARGET:
RM merge-check --source <SOURCE> --target <TARGET>TM create-patch-task --source "merge-conflict". GATE: "Loop back to Stage 2" / "Abort release".git checkout <TARGET> && git merge <SOURCE> --no-ff -m "Merge <SOURCE> into <TARGET> for release X.X.X"CTX.config.verify_command: Run it. On failure → GATE: "Loop back to Stage 2" / "Proceed despite failures" / "Abort release".Reusable procedure invoked before every git push in Stages 5 and 7. This is distinct from the Merge Template's verify step — it catches regressions introduced after the merge (e.g. by version bump commits).
Resolve the build/test command: CTX.config.verify_command if set, otherwise auto-detect from project files (package.json → npm run build && npm test, Cargo.toml → cargo build && cargo test, go.mod → go build ./... && go test ./..., pyproject.toml → python -m build && pytest, pom.xml → mvn package). If nothing is detected, GATE: "No build/test command found. Enter command or skip."
Run locally on the current branch. On failure:
TM create-patch-task --source "local-build" --title "Fix local build/test failure before push" --release X.X.XOn success: "Local build and tests passed. Proceeding to push."
Before every loop-back to Stage 2, increment and check:
RM release-state-set --version X.X.X --stage 2 --stage-name "Task Readiness Gate" --increment-loop
Read CTX.release_state.loop_count:
1a. Determine version:
"auto" + CTX.release_plan.has_plan → use CTX.release_plan.next_version.1b. List tasks: TM list-release-tasks --version X.X.X
Present: Release X.X.X — Task Summary: [CODE] — Title (status) for each.
1c. Create release branch: git checkout -b release/X.X.X <CTX.config.development_branch>
1d. RM release-plan-set-status --version X.X.X --status in-progress
1e. GATE: "Proceed to Task Readiness Gate" / "Abort release" (delete branch, stop).
Verifies that all tasks assigned to this release are complete before proceeding. The release pipeline does NOT implement tasks — task implementation must be done separately using the /task pick skill.
2a. List all release tasks: TM list-release-tasks --version X.X.X
2b. Check task statuses:
done status → proceed to Stage 3.done status → STOP (step 2c).2c. Present the blocking report:
Release X.X.X blocked — N task(s) still pending.
The following tasks must be completed before the release can proceed:
Code Title Status [CODE] [Title] [todo/progressing] To implement these tasks, exit the release pipeline and use:
/task pick [CODE]— pick up and implement a specific task/task pick all— pick up and implement all pending release tasks sequentially in dependency orderOnce all tasks are done, re-run
/release continue X.X.X(or/release continue resume) to continue.
2d. Save release state: RM release-state-set --version X.X.X --stage 2 --stage-name "Task Readiness Gate"
2e. GATE: "Abort release (implement tasks first)" / "Skip to next stage (not recommended — unfinished tasks will not be included)"
Exit condition: All tasks for the release are in done status → proceed with OK.
3a. Retrieve open PRs targeting the release branch or development branch:
PM list-pr base="<CTX.config.development_branch>" state="open"
3b. Present: "Found N open PRs:" with number, title, author, branch for each.
3c. GATE: "Review PRs sequentially" / "Skip PR analysis (proceed to merge)" / "Abort release".
Exit condition: PR list fetched → proceed.
Review each open PR sequentially. Keep the review, comment, fix, and merge trail on the PR itself.
For each PR:
python3 ${CLAW_ROOT}/scripts/quality_gate.py --root <PROJECT_ROOT> --files <changed_files_from_diff> --verify-command '{VERIFY_COMMAND}' --json{PLATFORM_CLI} pr merge {NUMBER} --squash --delete-branch when it is ready.4a. Collect results from all reviewed PRs.
4b. Present consolidated report: PR number, findings count, fixes applied, unresolved issues, merge status.
4c. If unresolved issues exist: create RPAT tasks via TM create-patch-task --source "pr-review" --title "..." --release X.X.X --description "..." for each.
4d. Check loop counter per Loop Counter rules.
4e. GATE (if unresolved): "Loop back to Stage 2 to fix patches" / "Proceed despite unresolved issues" / "Abort release".
4f. GATE (all resolved): "All PRs processed. Proceed to Merge to Staging" / "Abort release".
Exit condition: All open PRs reviewed and handled → proceed to Stage 5.
5a. Check staging branch exists: git branch --list <CTX.config.staging_branch>
5b. If missing → GATE: "Create staging from develop" (git checkout -b <staging> <development>) / "Abort release".
Note: Staging is a mandatory validation gate. It mirrors production configuration but is not public. Pushing to staging triggers the latest Docker image build via CI.
5c. Execute merge from <CTX.config.development_branch> to <CTX.config.staging_branch> per Merge Template.
5d. On merge issues: create RPAT tasks with --source "staging-merge". Check Loop Counter. GATE: "Loop back to Stage 2" / "Abort release".
5e. Run Local Build Gate on the staging branch.
5f. Push: git push origin <CTX.config.staging_branch> — this triggers the latest Docker image build via CI.
5g. Create staging tag with -staging suffix to mark the staging release point without conflicting with the production tag:
git tag -a <tag_prefix>X.X.X-staging -m "Staging release <tag_prefix>X.X.X-staging"
git push origin <tag_prefix>X.X.X-staging
Exit condition: Staging stable, verified, and tagged → proceed with OK.
6a. Determine test command: CTX.config.verify_command if set, else auto-detect:
package.json with test script → npm testpytest.ini / pyproject.toml [tool.pytest] → pytestgo.mod → go test ./...Cargo.toml → cargo test6b. Run full test suite on staging branch. Present pass/fail count + coverage.
6c. Optional — run local coverage gap analysis on the changed files.
6d. On failures: create RPAT tasks with TM create-patch-task --source "integration-test". Check Loop Counter.
GATE: "Loop back to Stage 2 to fix test failures" / "Proceed despite failures" / "Abort release".
6e. All pass → GATE: "Proceed to tag" / "Run tests again" / "Abort release".
Exit condition: All integration tests pass → proceed with OK.
7a. Merge staging into production per Merge Template: <CTX.config.staging_branch> → <CTX.config.production_branch>.
7b. Generate changelog:
RM parse-commits --since "<CTX.tags.latest>" | RM generate-changelog --version "X.X.X" --date "$(date +%Y-%m-%d)"
7c. Update CTX.config.changelog_file: insert new section after ## [Unreleased], update comparison links.
7d. Version Bump Gate:
RM update-versions --version "X.X.X" --package-paths "<CTX.config.package_paths>"
Omit --package-paths if CTX.config.package_paths is empty — the command will auto-discover all package.json (outside node_modules/), pyproject.toml, setup.cfg, Cargo.toml, pom.xml, and build.gradle in the repository.
Parse the JSON output. Present a confirmation table from the updated array, and list any skipped entries with reasons:
| File | Old Version | New Version |
|---|---|---|
| path/to/manifest | (previous) | X.X.X |
Inform the user which files were updated and where.
GATE: "Confirm version bump and proceed to commit" / "Edit manually" / "Abort release".
7e. Commit and tag:
git add <package_paths> <changelog_file>
git commit -m "chore(release): <tag_prefix>X.X.X"
git tag -a <tag_prefix>X.X.X -m "Release <tag_prefix>X.X.X"
7e-bis. Run Local Build Gate on the production branch.
7f. Push: git push origin <production_branch> --tags — this triggers the release CI which builds the stable + vX.X.X Docker images.
7f-bis. Post-Tag CI Monitoring — Discover triggered workflows:
Only run if CTX.platform.enabled is true. Otherwise skip to 7g with: "Platform integration not enabled — skipping remote CI monitoring."
sleep 10
PM list-ci-runs --ref "<tag_prefix>X.X.X"
Present: "Found N workflows triggered by tag push."
If no workflows are found, skip to 7g with: "No CI workflows triggered — proceeding."
7f-ter. Inspect each workflow run sequentially:
For each workflow run:
{PLATFORM_CLI} run view {RUN_ID} --repo {REPO} --json status,conclusion until completed.{PLATFORM_CLI} run view {RUN_ID} --repo {REPO} --log-failed
b. Identify root cause and fix the relevant file(s).
c. Commit to {DEVELOPMENT_BRANCH}, push, open PR to {PRODUCTION_BRANCH}, merge.
d. Record the fix details and PR URL.Where {PLATFORM_CLI} is gh for GitHub or glab for GitLab, derived from CTX.platform.platform.
7f-quater. Collect results and present:
| Workflow | Result | Fix Applied |
|---|---|---|
| name | pass | — |
| name | fail → fixed | PR #N: description |
7f-quinquies. If any fix was applied → Tag Move Sub-Loop:
A merged fix means the tag no longer points to the correct HEAD:
git tag -d <tag_prefix>X.X.Xgit push origin :refs/tags/<tag_prefix>X.X.Xgit pull origin <production_branch>git tag -a <tag_prefix>X.X.X -m "Release <tag_prefix>X.X.X"git push origin <tag_prefix>X.X.XThen delete and recreate the platform release — never edit a release after its tag has moved; editing detaches the release object:
PM delete-release --tag "<tag_prefix>X.X.X"
PM create-release --tag "<tag_prefix>X.X.X" --title "..." --notes "..."
Increment loop counter. Re-run from 7f-bis. Warn at 3 iterations, force user decision at 5.
GATE (all green): "All CI workflows passed. Proceed to Step 7g." / "Abort release".
7g. If platform enabled: create release via PM create-release. If fails, warn — local tag is source of truth.
7h. Documentation sync — run /docs sync to update project documentation based on release changes. If docs/ directory does not exist, skip with: "No existing docs found — run /docs generate to create initial documentation." If docs/ exists, run the sync flow automatically. On failure, warn but do not block the release.
7i. GATE: "Confirm release published" / "Rollback tag" (git tag -d <prefix>X.X.X && git push origin :refs/tags/<prefix>X.X.X) / "Abort release".
Present:
Release X.X.X is now live. Included tasks: [CODE] — Title (for each) Tag:
<prefix>X.X.X| Platform release: [URL if created] | Changelog: <changelog_file> Now available for user testing. Feedback feeds into next release cycle.
Social media announcement step. Skippable. Only runs if social_announce is configured in project-config.json.
8.5a. Check if social announcements are configured:
python3 ${CLAW_ROOT}/scripts/social_announcer.py platforms
If no platforms are configured or all are disabled → skip with: "No social platforms configured — skipping announcement step."
8.5b. Generate announcements:
python3 ${CLAW_ROOT}/scripts/social_announcer.py generate --version X.X.X --changelog-file <CTX.config.changelog_file> --repo-url <CTX.config.repo_url>
8.5c. Preview all announcements:
python3 ${CLAW_ROOT}/scripts/social_announcer.py preview --version X.X.X
Present the preview to the user showing each platform and its formatted announcement.
8.5d. GATE: "Post to all configured platforms" / "Select specific platforms" / "Skip announcements".
In yolo mode, auto-select "Post to all configured platforms".
8.5e. For each selected platform with direct posting (Bluesky, Mastodon, Discord, Slack):
python3 ${CLAW_ROOT}/scripts/social_announcer.py post --platform <name> --message "<announcement>"
8.5f. For each clipboard platform (Twitter/X, LinkedIn, Reddit, Hacker News):
python3 ${CLAW_ROOT}/scripts/social_announcer.py post --platform clipboard --message "<announcement>"
Present: "Announcement copied to clipboard. Open [URL] to post."
8.5g. Present posting results:
| Platform | Status | URL |
|---|---|---|
| bluesky | Posted | https://... |
| discord | Posted | — |
| twitter (clipboard) | Copied | Open https://twitter.com/compose/tweet |
9a. Mark released: RM release-plan-mark-released --version X.X.X
9a-bis. Platform milestone close (if CTX.platform.enabled):
GATE: "Yes, close milestone vX.X.X (recommended)" / "Keep milestone open" / "Abort cleanup".
In yolo mode, auto-select "Yes, close milestone vX.X.X".
If "Yes": execute PM close-milestone title="vX.X.X". On failure, warn but continue — local release state is source of truth.
9b. GATE: "Delete release branch" (git branch -d release/X.X.X && git push origin --delete release/X.X.X) / "Keep release branch" / "Abort cleanup".
9c. Clear state: RM release-state-clear
9e. Final report table:
| Stage | Status |
|---|---|
| 1. Create Branch | Branch created |
| 2. Task Readiness Gate | All tasks verified complete |
| 3. Fetch Open PRs | N PRs found |
| 4. Per-PR Review | N PRs reviewed (M findings, K fixed) |
| 5. Merge Staging | Clean/Conflict resolved |
| 6. Integration Tests | All passed |
| 7. Merge Main + Tag | X.X.X |
| 8. Users Testing | Live |
| 8.5. Announce | N platforms posted / skipped |
| 9. End | Pipeline cleared |
Total loop iterations: N | Patch tasks created: N | PRs reviewed: N
| Stage | Issues go to | Then loops back to |
|---|---|---|
| Per-PR Review (unresolved) | Release Patches (RPAT) | Task Readiness Gate (Stage 2) |
| Merge to Staging | Release Patches (RPAT) | Task Readiness Gate (Stage 2) |
| Integration Tests | Release Patches (RPAT) | Task Readiness Gate (Stage 2) |
| Local build pre-push (5 / 7) | RPAT task | Task Readiness Gate (Stage 2) |
| Post-Tag CI Monitor (7f) | Fix → PR → merge → tag move | CI Monitor (7f-bis), same stage |
Manually finalize a release: verify all tasks are complete, close the milestone, and clean up.
1. Version from dispatch version field. If missing → list in-progress releases from RM release-plan-list and ask.
2. Check release readiness:
RM release-close --version X.X.X
3. If all_tasks_done is false: present pending tasks table.
GATE: "Force close anyway (pending tasks will NOT be included)" / "Cancel (implement tasks first)"
4. If all_tasks_done is true (or force-closed):
RM release-plan-mark-released --version X.X.X
5. Platform milestone close (if CTX.platform.enabled):
GATE: "Yes, close milestone vX.X.X (recommended)" / "Keep milestone open" / "Skip".
In yolo mode, auto-select "Yes, close milestone vX.X.X".
If "Yes": execute PM close-milestone title="vX.X.X". On failure, warn but continue.
6. Clean up release state (if exists for this version):
RM release-state-clear
7. Present:
Release X.X.X closed. Tasks: N done out of M total. Status: released | Milestone: closed (or N/A)
Modify fields of an existing release milestone in-place.
1. Version from dispatch version field. If missing → list releases from RM release-plan-list and ask: "Which release do you want to edit?" STOP.
2. Verify release exists: RM release-plan-list. If version not found → inform and stop.
3. Present current milestone fields:
| # | Field | Current Value |
|---|---|---|
| 1 | Version | [X.X.X] |
| 2 | Theme | [current theme or empty] |
| 3 | Target Date | [YYYY-MM-DD or empty] |
| 4 | Status | [planned/in-progress/released] |
| 5 | Tasks | [list of assigned task codes] |
4. AskUserQuestion multiSelect: "Which fields do you want to edit?" with options:
STOP.
5. For each selected field, present the current value and ask for the new value.
6. Confirm changes:
Present a diff-style summary of old vs new values for each modified field.
AskUserQuestion: "Apply these changes" | "Needs adjustments" | "Cancel"
STOP.
7. Apply changes:
For status changes:
RM release-plan-set-status --version X.X.X --status <new_status>
For theme and target date changes (if CTX.platform.enabled): use PM edit-issue to update the milestone title and due date. If the platform manager does not support milestone-level edits, fall back to gh api with explicit --field flags to prevent shell injection:
gh api --method PATCH "/repos/{owner}/{repo}/milestones/{milestone_number}" \
--field title="<sanitized_theme>" \
--field due_on="<YYYY-MM-DDT00:00:00Z>"
Validate user-supplied values before applying: theme must be non-empty and under 256 characters; target date must match YYYY-MM-DD format. Reject or truncate values that fail validation.
Also update local releases.json via RM release-plan-set-status or direct edit.
8. Report: "Release X.X.X updated. Fields changed: [list]." Include milestone URL if applicable.
/task pick (or /task pick all). Task implementation is always the user's responsibility via the /task pick skill./task pick before resuming.vX.X.X) are only created on the production branch after full pipeline through staging. Staging tags (vX.X.X-staging) are created on the staging branch at Step 5g to mark the staging release point without conflicting with the production tag.CTX.config.verify_command locally before pushing to staging or production. This is distinct from the Merge Template's verify step — it catches regressions introduced after merge (e.g. by version bump commits). Failures create RPAT tasks and loop back to Stage 2.CTX.platform.enabled). Without a connected platform, local build success is the sole pre-release gate.-staging suffix (vX.X.X-staging) to avoid colliding with production tags (vX.X.X). The get_latest_tag() function in release_manager.py filters out -staging tags when determining the latest production version.