diff --git a/land-and-deploy/SKILL.md b/land-and-deploy/SKILL.md index 55a86d2d40..71e878110d 100644 --- a/land-and-deploy/SKILL.md +++ b/land-and-deploy/SKILL.md @@ -1101,7 +1101,7 @@ BASE_VERSION=$(git show origin/$BASE_BRANCH:VERSION 2>/dev/null | tr -d '\r\n[:s # We don't need the exact original level — we just need "a level" that passes to the util. # If the minor digit advanced, call it minor; patch digit, patch; etc. If base > branch, skip (not ours to land). # For simplicity: use "patch" as a conservative default; util handles collision-past regardless of input level. -QUEUE_JSON=$(bun run bin/gstack-next-version \ +QUEUE_JSON=$(~/.claude/skills/gstack/bin/gstack-next-version \ --base "$BASE_BRANCH" \ --bump patch \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}') diff --git a/land-and-deploy/SKILL.md.tmpl b/land-and-deploy/SKILL.md.tmpl index a08debea7c..ba6013ca69 100644 --- a/land-and-deploy/SKILL.md.tmpl +++ b/land-and-deploy/SKILL.md.tmpl @@ -341,7 +341,7 @@ BASE_VERSION=$(git show origin/$BASE_BRANCH:VERSION 2>/dev/null | tr -d '\r\n[:s # We don't need the exact original level — we just need "a level" that passes to the util. # If the minor digit advanced, call it minor; patch digit, patch; etc. If base > branch, skip (not ours to land). # For simplicity: use "patch" as a conservative default; util handles collision-past regardless of input level. -QUEUE_JSON=$(bun run bin/gstack-next-version \ +QUEUE_JSON=$(~/.claude/skills/gstack/bin/gstack-next-version \ --base "$BASE_BRANCH" \ --bump patch \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}') diff --git a/landing-report/SKILL.md b/landing-report/SKILL.md index 4a04d77f76..c960662f82 100644 --- a/landing-report/SKILL.md +++ b/landing-report/SKILL.md @@ -723,7 +723,7 @@ they'd claim for micro/patch/minor/major. Cheap (same gh call cached by bun). ```bash for LEVEL in micro patch minor major; do - bun run bin/gstack-next-version \ + ~/.claude/skills/gstack/bin/gstack-next-version \ --base "$BASE_BRANCH" \ --bump "$LEVEL" \ --current-version "$BASE_VERSION" \ diff --git a/landing-report/SKILL.md.tmpl b/landing-report/SKILL.md.tmpl index 32a8cc1ab0..75e761caec 100644 --- a/landing-report/SKILL.md.tmpl +++ b/landing-report/SKILL.md.tmpl @@ -67,7 +67,7 @@ they'd claim for micro/patch/minor/major. Cheap (same gh call cached by bun). ```bash for LEVEL in micro patch minor major; do - bun run bin/gstack-next-version \ + ~/.claude/skills/gstack/bin/gstack-next-version \ --base "$BASE_BRANCH" \ --bump "$LEVEL" \ --current-version "$BASE_VERSION" \ diff --git a/review/SKILL.md b/review/SKILL.md index f21a401213..babd740e60 100644 --- a/review/SKILL.md +++ b/review/SKILL.md @@ -980,7 +980,7 @@ Check whether this PR's claimed VERSION still points at a free slot in the queue BRANCH_VERSION=$(git show HEAD:VERSION 2>/dev/null | tr -d '\r\n[:space:]' || echo "") BASE_BRANCH=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main) BASE_VERSION=$(git show origin/$BASE_BRANCH:VERSION 2>/dev/null | tr -d '\r\n[:space:]' || echo "") -QUEUE_JSON=$(bun run bin/gstack-next-version \ +QUEUE_JSON=$(~/.claude/skills/gstack/bin/gstack-next-version \ --base "$BASE_BRANCH" \ --bump patch \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}') diff --git a/review/SKILL.md.tmpl b/review/SKILL.md.tmpl index fada691125..69aad450cf 100644 --- a/review/SKILL.md.tmpl +++ b/review/SKILL.md.tmpl @@ -82,7 +82,7 @@ Check whether this PR's claimed VERSION still points at a free slot in the queue BRANCH_VERSION=$(git show HEAD:VERSION 2>/dev/null | tr -d '\r\n[:space:]' || echo "") BASE_BRANCH=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo main) BASE_VERSION=$(git show origin/$BASE_BRANCH:VERSION 2>/dev/null | tr -d '\r\n[:space:]' || echo "") -QUEUE_JSON=$(bun run bin/gstack-next-version \ +QUEUE_JSON=$(~/.claude/skills/gstack/bin/gstack-next-version \ --base "$BASE_BRANCH" \ --bump patch \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}') diff --git a/ship/SKILL.md b/ship/SKILL.md index 1030ef9938..3c59bf40c6 100644 --- a/ship/SKILL.md +++ b/ship/SKILL.md @@ -2377,7 +2377,7 @@ fi Read the `STATE:` line and dispatch: - **FRESH** → proceed with the bump action below (steps 1–4). -- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. +- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `~/.claude/skills/gstack/bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. - **DRIFT_STALE_PKG** → a prior `/ship` bumped `VERSION` but failed to update `package.json`. Run the sync-only repair block below (after step 4). Do NOT re-bump. Reuse `CURRENT_VERSION` for CHANGELOG and PR body. (Queue check still runs in ALREADY_BUMPED terms after repair.) - **DRIFT_UNEXPECTED** → `/ship` has halted (exit 1). Resolve manually; /ship cannot tell which file is authoritative. @@ -2393,10 +2393,10 @@ Read the `STATE:` line and dispatch: Save the chosen level as `BUMP_LEVEL` (one of `major`, `minor`, `patch`, `micro`). This is the user-intended level. The next step decides *placement* — the level stays the same even if queue-aware allocation has to advance past a claimed slot. -3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: +3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `~/.claude/skills/gstack/bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: ```bash - QUEUE_JSON=$(bun run bin/gstack-next-version \ + QUEUE_JSON=$(~/.claude/skills/gstack/bin/gstack-next-version \ --base \ --bump "$BUMP_LEVEL" \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}') diff --git a/ship/SKILL.md.tmpl b/ship/SKILL.md.tmpl index b6a19bcbab..1b95eef24f 100644 --- a/ship/SKILL.md.tmpl +++ b/ship/SKILL.md.tmpl @@ -451,7 +451,7 @@ fi Read the `STATE:` line and dispatch: - **FRESH** → proceed with the bump action below (steps 1–4). -- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. +- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `~/.claude/skills/gstack/bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. - **DRIFT_STALE_PKG** → a prior `/ship` bumped `VERSION` but failed to update `package.json`. Run the sync-only repair block below (after step 4). Do NOT re-bump. Reuse `CURRENT_VERSION` for CHANGELOG and PR body. (Queue check still runs in ALREADY_BUMPED terms after repair.) - **DRIFT_UNEXPECTED** → `/ship` has halted (exit 1). Resolve manually; /ship cannot tell which file is authoritative. @@ -467,10 +467,10 @@ Read the `STATE:` line and dispatch: Save the chosen level as `BUMP_LEVEL` (one of `major`, `minor`, `patch`, `micro`). This is the user-intended level. The next step decides *placement* — the level stays the same even if queue-aware allocation has to advance past a claimed slot. -3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: +3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `~/.claude/skills/gstack/bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: ```bash - QUEUE_JSON=$(bun run bin/gstack-next-version \ + QUEUE_JSON=$(~/.claude/skills/gstack/bin/gstack-next-version \ --base \ --bump "$BUMP_LEVEL" \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}') diff --git a/test/fixtures/golden/claude-ship-SKILL.md b/test/fixtures/golden/claude-ship-SKILL.md index 1030ef9938..3c59bf40c6 100644 --- a/test/fixtures/golden/claude-ship-SKILL.md +++ b/test/fixtures/golden/claude-ship-SKILL.md @@ -2377,7 +2377,7 @@ fi Read the `STATE:` line and dispatch: - **FRESH** → proceed with the bump action below (steps 1–4). -- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. +- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `~/.claude/skills/gstack/bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. - **DRIFT_STALE_PKG** → a prior `/ship` bumped `VERSION` but failed to update `package.json`. Run the sync-only repair block below (after step 4). Do NOT re-bump. Reuse `CURRENT_VERSION` for CHANGELOG and PR body. (Queue check still runs in ALREADY_BUMPED terms after repair.) - **DRIFT_UNEXPECTED** → `/ship` has halted (exit 1). Resolve manually; /ship cannot tell which file is authoritative. @@ -2393,10 +2393,10 @@ Read the `STATE:` line and dispatch: Save the chosen level as `BUMP_LEVEL` (one of `major`, `minor`, `patch`, `micro`). This is the user-intended level. The next step decides *placement* — the level stays the same even if queue-aware allocation has to advance past a claimed slot. -3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: +3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `~/.claude/skills/gstack/bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: ```bash - QUEUE_JSON=$(bun run bin/gstack-next-version \ + QUEUE_JSON=$(~/.claude/skills/gstack/bin/gstack-next-version \ --base \ --bump "$BUMP_LEVEL" \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}') diff --git a/test/fixtures/golden/codex-ship-SKILL.md b/test/fixtures/golden/codex-ship-SKILL.md index 40a03b38c0..babca8aa8a 100644 --- a/test/fixtures/golden/codex-ship-SKILL.md +++ b/test/fixtures/golden/codex-ship-SKILL.md @@ -1992,7 +1992,7 @@ fi Read the `STATE:` line and dispatch: - **FRESH** → proceed with the bump action below (steps 1–4). -- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. +- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `$GSTACK_ROOT/bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. - **DRIFT_STALE_PKG** → a prior `/ship` bumped `VERSION` but failed to update `package.json`. Run the sync-only repair block below (after step 4). Do NOT re-bump. Reuse `CURRENT_VERSION` for CHANGELOG and PR body. (Queue check still runs in ALREADY_BUMPED terms after repair.) - **DRIFT_UNEXPECTED** → `/ship` has halted (exit 1). Resolve manually; /ship cannot tell which file is authoritative. @@ -2008,10 +2008,10 @@ Read the `STATE:` line and dispatch: Save the chosen level as `BUMP_LEVEL` (one of `major`, `minor`, `patch`, `micro`). This is the user-intended level. The next step decides *placement* — the level stays the same even if queue-aware allocation has to advance past a claimed slot. -3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: +3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `$GSTACK_ROOT/bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: ```bash - QUEUE_JSON=$(bun run bin/gstack-next-version \ + QUEUE_JSON=$($GSTACK_ROOT/bin/gstack-next-version \ --base \ --bump "$BUMP_LEVEL" \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}') diff --git a/test/fixtures/golden/factory-ship-SKILL.md b/test/fixtures/golden/factory-ship-SKILL.md index c361b59cba..d9326d7395 100644 --- a/test/fixtures/golden/factory-ship-SKILL.md +++ b/test/fixtures/golden/factory-ship-SKILL.md @@ -2368,7 +2368,7 @@ fi Read the `STATE:` line and dispatch: - **FRESH** → proceed with the bump action below (steps 1–4). -- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. +- **ALREADY_BUMPED** → skip the bump by default, BUT check for queue drift first: call `$GSTACK_ROOT/bin/gstack-next-version` with the implied bump level (derived from `CURRENT_VERSION` vs `BASE_VERSION`), compare its `.version` against `CURRENT_VERSION`. If they differ (queue moved since last ship), use **AskUserQuestion**: "VERSION drift detected: you claim v but next available is v (queue moved). A) Rebump to v and rewrite CHANGELOG header + PR title (recommended), B) Keep v — will be rejected by CI version-gate until resolved." If A, treat this as FRESH with `NEW_VERSION=` and run steps 1-4 (which will also trigger Step 13 CHANGELOG header rewrite and Step 19 PR title rewrite). If B, reuse `CURRENT_VERSION` and warn that CI will likely reject. If util is offline, warn and reuse `CURRENT_VERSION`. - **DRIFT_STALE_PKG** → a prior `/ship` bumped `VERSION` but failed to update `package.json`. Run the sync-only repair block below (after step 4). Do NOT re-bump. Reuse `CURRENT_VERSION` for CHANGELOG and PR body. (Queue check still runs in ALREADY_BUMPED terms after repair.) - **DRIFT_UNEXPECTED** → `/ship` has halted (exit 1). Resolve manually; /ship cannot tell which file is authoritative. @@ -2384,10 +2384,10 @@ Read the `STATE:` line and dispatch: Save the chosen level as `BUMP_LEVEL` (one of `major`, `minor`, `patch`, `micro`). This is the user-intended level. The next step decides *placement* — the level stays the same even if queue-aware allocation has to advance past a claimed slot. -3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: +3. **Queue-aware version pick (workspace-aware ship, v1.6.4.0+).** Call `$GSTACK_ROOT/bin/gstack-next-version` to see what's already claimed by open PRs + active sibling Conductor worktrees, then render the queue state to the user: ```bash - QUEUE_JSON=$(bun run bin/gstack-next-version \ + QUEUE_JSON=$($GSTACK_ROOT/bin/gstack-next-version \ --base \ --bump "$BUMP_LEVEL" \ --current-version "$BASE_VERSION" 2>/dev/null || echo '{"offline":true}')