diff --git a/.agents/skills/deploy/SKILL.md b/.agents/skills/deploy/SKILL.md index c1887ed..274faa4 100644 --- a/.agents/skills/deploy/SKILL.md +++ b/.agents/skills/deploy/SKILL.md @@ -92,7 +92,7 @@ Would you like to bump the version before deploying? - **minor** → X.B.0 - **major** → A.0.0 - **specific** → enter a version number - - **skip** → proceed to release with the current tag + - **skip** → proceed to release with the latest existing tag ``` Wait for their response. @@ -101,12 +101,12 @@ Wait for their response. ## Step 3 — Version bump (if requested) -If the user chose to skip, verify a version tag exists on HEAD: +If the user chose to skip, find the latest version tag in the branch history: ```bash -git describe --exact-match --tags HEAD 2>/dev/null +git describe --tags --abbrev=0 2>/dev/null ``` -If no tag is found when skipping, warn: "No version tag found on HEAD. You must bump the version before deploying." Return to the version bump prompt. +If no tag is found at all (first release), warn: "No version tag found. You must bump the version before deploying." Return to the version bump prompt. Otherwise, use the tag found as the release version. If the user chose a bump level, map their response to a command: @@ -235,4 +235,4 @@ After the command runs, note the release URL from the output. Tell the user: > "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at ``. Run `make deploy-prod` to ship to production." - + diff --git a/.agents/skills/status/SKILL.md b/.agents/skills/status/SKILL.md index 38983e9..e9afa6c 100644 --- a/.agents/skills/status/SKILL.md +++ b/.agents/skills/status/SKILL.md @@ -118,6 +118,68 @@ Do not post, comment, write files, or take any action. Output only. --- +## Step 6 — What's next + +After the status summary, append a single actionable suggestion based on local git state and the GitHub data already fetched. + +### 6a — Gather additional local state + +Run these commands (skip if not in a git repo): + +```bash +git branch --show-current +``` + +```bash +git status --porcelain +``` + +```bash +git describe --tags --abbrev=0 2>/dev/null +``` + +```bash +git rev-list ..HEAD --count 2>/dev/null +``` + +From the GitHub data fetched in Step 2, also check for the current branch's PR approval status: + +```bash +gh pr view --json number,title,url,reviewDecision,statusCheckRollup \ + --jq '{number,title,url,reviewDecision,checks: [.statusCheckRollup[]? | .status]}' +``` + +If `gh pr view` exits non-zero (no PR for current branch), note that there is no open PR. + +### 6b — Determine suggestion + +Evaluate the following conditions **in order**. Use the **first** match: + +| Priority | Condition | Output | +|----------|-----------|--------| +| 1 | On a `feature/*` branch with uncommitted changes (`git status --porcelain` is non-empty) | `What's next: You have uncommitted changes on \`\`. When ready, run \`/submit-for-review\`.` | +| 2 | On a `feature/*` branch with an open PR that has `reviewDecision: APPROVED` and all status checks are `COMPLETED` | `What's next: PR # is approved and checks pass. Consider running \`/deploy\`.` | +| 3 | On a `feature/*` branch with an open PR (any other review/check state) | `What's next: PR # () is open and awaiting review.` | +| 4 | On a `feature/*` branch with no open PR and clean working tree | `What's next: No open PR for \`<branch>\`. Run \`/submit-for-review\` to open one.` | +| 5 | On the integration branch (`dev`, `develop`, or `main` when no integration branch exists) with unreleased commits (rev-list count > 0 since last tag) | `What's next: <N> commit(s) on \`<branch>\` since \`<tag>\`. Run \`/deploy\` when ready to release.` | +| 6 | No open PRs, no open issues assigned to subject | `What's next: Nothing in progress. Run \`/start\` to begin new work.` | +| 7 | Open issues exist in "Up next" | `What's next: Next up is #<number> (<title>). Run \`/start <number>\` to pick it up.` | + +If none of the above match, omit the "What's next" section entirely. + +### 6c — Format + +Print the suggestion after a horizontal rule, below the local commits section: + +``` +--- +🧭 <suggestion text> +``` + +This section is omitted in milestone mode. + +--- + ## Milestone mode (Steps M1–M3) Only entered when `--milestone` or `--sprint` is detected in Step 1. @@ -176,8 +238,7 @@ Do not post, comment, write files, or take any action. Output only. ## Hard rules - Never write to GitHub (no comments, labels, issue updates, or PR changes). -- Never suggest what the developer should work on next. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it. -<!-- generated by CodeCannon/sync.sh | skill: status | adapter: codex | hash: a0b51014 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> +<!-- generated by CodeCannon/sync.sh | skill: status | adapter: codex | hash: 08068d91 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> diff --git a/.claude/commands/deploy.md b/.claude/commands/deploy.md index f53cac1..3cf9838 100644 --- a/.claude/commands/deploy.md +++ b/.claude/commands/deploy.md @@ -87,7 +87,7 @@ Would you like to bump the version before deploying? - **minor** → X.B.0 - **major** → A.0.0 - **specific** → enter a version number - - **skip** → proceed to release with the current tag + - **skip** → proceed to release with the latest existing tag ``` Wait for their response. @@ -96,12 +96,12 @@ Wait for their response. ## Step 3 — Version bump (if requested) -If the user chose to skip, verify a version tag exists on HEAD: +If the user chose to skip, find the latest version tag in the branch history: ```bash -git describe --exact-match --tags HEAD 2>/dev/null +git describe --tags --abbrev=0 2>/dev/null ``` -If no tag is found when skipping, warn: "No version tag found on HEAD. You must bump the version before deploying." Return to the version bump prompt. +If no tag is found at all (first release), warn: "No version tag found. You must bump the version before deploying." Return to the version bump prompt. Otherwise, use the tag found as the release version. If the user chose a bump level, map their response to a command: @@ -230,4 +230,4 @@ After the command runs, note the release URL from the output. Tell the user: > "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at `<url>`. Run `make deploy-prod` to ship to production." -<!-- generated by CodeCannon/sync.sh | skill: deploy | adapter: claude | hash: 4819f2e7 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> +<!-- generated by CodeCannon/sync.sh | skill: deploy | adapter: claude | hash: 4e4a48f5 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> diff --git a/.claude/commands/status.md b/.claude/commands/status.md index 77d363f..d3dfca6 100644 --- a/.claude/commands/status.md +++ b/.claude/commands/status.md @@ -113,6 +113,68 @@ Do not post, comment, write files, or take any action. Output only. --- +## Step 6 — What's next + +After the status summary, append a single actionable suggestion based on local git state and the GitHub data already fetched. + +### 6a — Gather additional local state + +Run these commands (skip if not in a git repo): + +```bash +git branch --show-current +``` + +```bash +git status --porcelain +``` + +```bash +git describe --tags --abbrev=0 2>/dev/null +``` + +```bash +git rev-list <latest-tag>..HEAD --count 2>/dev/null +``` + +From the GitHub data fetched in Step 2, also check for the current branch's PR approval status: + +```bash +gh pr view --json number,title,url,reviewDecision,statusCheckRollup \ + --jq '{number,title,url,reviewDecision,checks: [.statusCheckRollup[]? | .status]}' +``` + +If `gh pr view` exits non-zero (no PR for current branch), note that there is no open PR. + +### 6b — Determine suggestion + +Evaluate the following conditions **in order**. Use the **first** match: + +| Priority | Condition | Output | +|----------|-----------|--------| +| 1 | On a `feature/*` branch with uncommitted changes (`git status --porcelain` is non-empty) | `What's next: You have uncommitted changes on \`<branch>\`. When ready, run \`/submit-for-review\`.` | +| 2 | On a `feature/*` branch with an open PR that has `reviewDecision: APPROVED` and all status checks are `COMPLETED` | `What's next: PR #<number> is approved and checks pass. Consider running \`/deploy\`.` | +| 3 | On a `feature/*` branch with an open PR (any other review/check state) | `What's next: PR #<number> (<title>) is open and awaiting review.` | +| 4 | On a `feature/*` branch with no open PR and clean working tree | `What's next: No open PR for \`<branch>\`. Run \`/submit-for-review\` to open one.` | +| 5 | On the integration branch (`dev`, `develop`, or `main` when no integration branch exists) with unreleased commits (rev-list count > 0 since last tag) | `What's next: <N> commit(s) on \`<branch>\` since \`<tag>\`. Run \`/deploy\` when ready to release.` | +| 6 | No open PRs, no open issues assigned to subject | `What's next: Nothing in progress. Run \`/start\` to begin new work.` | +| 7 | Open issues exist in "Up next" | `What's next: Next up is #<number> (<title>). Run \`/start <number>\` to pick it up.` | + +If none of the above match, omit the "What's next" section entirely. + +### 6c — Format + +Print the suggestion after a horizontal rule, below the local commits section: + +``` +--- +🧭 <suggestion text> +``` + +This section is omitted in milestone mode. + +--- + ## Milestone mode (Steps M1–M3) Only entered when `--milestone` or `--sprint` is detected in Step 1. @@ -171,8 +233,7 @@ Do not post, comment, write files, or take any action. Output only. ## Hard rules - Never write to GitHub (no comments, labels, issue updates, or PR changes). -- Never suggest what the developer should work on next. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it. -<!-- generated by CodeCannon/sync.sh | skill: status | adapter: claude | hash: 79583183 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> +<!-- generated by CodeCannon/sync.sh | skill: status | adapter: claude | hash: 9e27a4dc | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> diff --git a/.cursor/rules/deploy.mdc b/.cursor/rules/deploy.mdc index 096256f..c9a8a4a 100644 --- a/.cursor/rules/deploy.mdc +++ b/.cursor/rules/deploy.mdc @@ -93,7 +93,7 @@ Would you like to bump the version before deploying? - **minor** → X.B.0 - **major** → A.0.0 - **specific** → enter a version number - - **skip** → proceed to release with the current tag + - **skip** → proceed to release with the latest existing tag ``` Wait for their response. @@ -102,12 +102,12 @@ Wait for their response. ## Step 3 — Version bump (if requested) -If the user chose to skip, verify a version tag exists on HEAD: +If the user chose to skip, find the latest version tag in the branch history: ```bash -git describe --exact-match --tags HEAD 2>/dev/null +git describe --tags --abbrev=0 2>/dev/null ``` -If no tag is found when skipping, warn: "No version tag found on HEAD. You must bump the version before deploying." Return to the version bump prompt. +If no tag is found at all (first release), warn: "No version tag found. You must bump the version before deploying." Return to the version bump prompt. Otherwise, use the tag found as the release version. If the user chose a bump level, map their response to a command: @@ -236,4 +236,4 @@ After the command runs, note the release URL from the output. Tell the user: > "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at `<url>`. Run `make deploy-prod` to ship to production." -<!-- generated by CodeCannon/sync.sh | skill: deploy | adapter: cursor | hash: 415c91f9 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> +<!-- generated by CodeCannon/sync.sh | skill: deploy | adapter: cursor | hash: 410b3166 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> diff --git a/.cursor/rules/status.mdc b/.cursor/rules/status.mdc index 8c4d88d..b94dd3b 100644 --- a/.cursor/rules/status.mdc +++ b/.cursor/rules/status.mdc @@ -119,6 +119,68 @@ Do not post, comment, write files, or take any action. Output only. --- +## Step 6 — What's next + +After the status summary, append a single actionable suggestion based on local git state and the GitHub data already fetched. + +### 6a — Gather additional local state + +Run these commands (skip if not in a git repo): + +```bash +git branch --show-current +``` + +```bash +git status --porcelain +``` + +```bash +git describe --tags --abbrev=0 2>/dev/null +``` + +```bash +git rev-list <latest-tag>..HEAD --count 2>/dev/null +``` + +From the GitHub data fetched in Step 2, also check for the current branch's PR approval status: + +```bash +gh pr view --json number,title,url,reviewDecision,statusCheckRollup \ + --jq '{number,title,url,reviewDecision,checks: [.statusCheckRollup[]? | .status]}' +``` + +If `gh pr view` exits non-zero (no PR for current branch), note that there is no open PR. + +### 6b — Determine suggestion + +Evaluate the following conditions **in order**. Use the **first** match: + +| Priority | Condition | Output | +|----------|-----------|--------| +| 1 | On a `feature/*` branch with uncommitted changes (`git status --porcelain` is non-empty) | `What's next: You have uncommitted changes on \`<branch>\`. When ready, run \`/submit-for-review\`.` | +| 2 | On a `feature/*` branch with an open PR that has `reviewDecision: APPROVED` and all status checks are `COMPLETED` | `What's next: PR #<number> is approved and checks pass. Consider running \`/deploy\`.` | +| 3 | On a `feature/*` branch with an open PR (any other review/check state) | `What's next: PR #<number> (<title>) is open and awaiting review.` | +| 4 | On a `feature/*` branch with no open PR and clean working tree | `What's next: No open PR for \`<branch>\`. Run \`/submit-for-review\` to open one.` | +| 5 | On the integration branch (`dev`, `develop`, or `main` when no integration branch exists) with unreleased commits (rev-list count > 0 since last tag) | `What's next: <N> commit(s) on \`<branch>\` since \`<tag>\`. Run \`/deploy\` when ready to release.` | +| 6 | No open PRs, no open issues assigned to subject | `What's next: Nothing in progress. Run \`/start\` to begin new work.` | +| 7 | Open issues exist in "Up next" | `What's next: Next up is #<number> (<title>). Run \`/start <number>\` to pick it up.` | + +If none of the above match, omit the "What's next" section entirely. + +### 6c — Format + +Print the suggestion after a horizontal rule, below the local commits section: + +``` +--- +🧭 <suggestion text> +``` + +This section is omitted in milestone mode. + +--- + ## Milestone mode (Steps M1–M3) Only entered when `--milestone` or `--sprint` is detected in Step 1. @@ -177,8 +239,7 @@ Do not post, comment, write files, or take any action. Output only. ## Hard rules - Never write to GitHub (no comments, labels, issue updates, or PR changes). -- Never suggest what the developer should work on next. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it. -<!-- generated by CodeCannon/sync.sh | skill: status | adapter: cursor | hash: 4b3e9659 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> +<!-- generated by CodeCannon/sync.sh | skill: status | adapter: cursor | hash: 3d26eb3e | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> diff --git a/.gemini/skills/deploy/SKILL.md b/.gemini/skills/deploy/SKILL.md index 81d0f8d..be52f23 100644 --- a/.gemini/skills/deploy/SKILL.md +++ b/.gemini/skills/deploy/SKILL.md @@ -92,7 +92,7 @@ Would you like to bump the version before deploying? - **minor** → X.B.0 - **major** → A.0.0 - **specific** → enter a version number - - **skip** → proceed to release with the current tag + - **skip** → proceed to release with the latest existing tag ``` Wait for their response. @@ -101,12 +101,12 @@ Wait for their response. ## Step 3 — Version bump (if requested) -If the user chose to skip, verify a version tag exists on HEAD: +If the user chose to skip, find the latest version tag in the branch history: ```bash -git describe --exact-match --tags HEAD 2>/dev/null +git describe --tags --abbrev=0 2>/dev/null ``` -If no tag is found when skipping, warn: "No version tag found on HEAD. You must bump the version before deploying." Return to the version bump prompt. +If no tag is found at all (first release), warn: "No version tag found. You must bump the version before deploying." Return to the version bump prompt. Otherwise, use the tag found as the release version. If the user chose a bump level, map their response to a command: @@ -235,4 +235,4 @@ After the command runs, note the release URL from the output. Tell the user: > "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at `<url>`. Run `make deploy-prod` to ship to production." -<!-- generated by CodeCannon/sync.sh | skill: deploy | adapter: gemini | hash: 2d52ae20 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> +<!-- generated by CodeCannon/sync.sh | skill: deploy | adapter: gemini | hash: 9dc417c9 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> diff --git a/.gemini/skills/status/SKILL.md b/.gemini/skills/status/SKILL.md index 4a58c99..dab504d 100644 --- a/.gemini/skills/status/SKILL.md +++ b/.gemini/skills/status/SKILL.md @@ -118,6 +118,68 @@ Do not post, comment, write files, or take any action. Output only. --- +## Step 6 — What's next + +After the status summary, append a single actionable suggestion based on local git state and the GitHub data already fetched. + +### 6a — Gather additional local state + +Run these commands (skip if not in a git repo): + +```bash +git branch --show-current +``` + +```bash +git status --porcelain +``` + +```bash +git describe --tags --abbrev=0 2>/dev/null +``` + +```bash +git rev-list <latest-tag>..HEAD --count 2>/dev/null +``` + +From the GitHub data fetched in Step 2, also check for the current branch's PR approval status: + +```bash +gh pr view --json number,title,url,reviewDecision,statusCheckRollup \ + --jq '{number,title,url,reviewDecision,checks: [.statusCheckRollup[]? | .status]}' +``` + +If `gh pr view` exits non-zero (no PR for current branch), note that there is no open PR. + +### 6b — Determine suggestion + +Evaluate the following conditions **in order**. Use the **first** match: + +| Priority | Condition | Output | +|----------|-----------|--------| +| 1 | On a `feature/*` branch with uncommitted changes (`git status --porcelain` is non-empty) | `What's next: You have uncommitted changes on \`<branch>\`. When ready, run \`/submit-for-review\`.` | +| 2 | On a `feature/*` branch with an open PR that has `reviewDecision: APPROVED` and all status checks are `COMPLETED` | `What's next: PR #<number> is approved and checks pass. Consider running \`/deploy\`.` | +| 3 | On a `feature/*` branch with an open PR (any other review/check state) | `What's next: PR #<number> (<title>) is open and awaiting review.` | +| 4 | On a `feature/*` branch with no open PR and clean working tree | `What's next: No open PR for \`<branch>\`. Run \`/submit-for-review\` to open one.` | +| 5 | On the integration branch (`dev`, `develop`, or `main` when no integration branch exists) with unreleased commits (rev-list count > 0 since last tag) | `What's next: <N> commit(s) on \`<branch>\` since \`<tag>\`. Run \`/deploy\` when ready to release.` | +| 6 | No open PRs, no open issues assigned to subject | `What's next: Nothing in progress. Run \`/start\` to begin new work.` | +| 7 | Open issues exist in "Up next" | `What's next: Next up is #<number> (<title>). Run \`/start <number>\` to pick it up.` | + +If none of the above match, omit the "What's next" section entirely. + +### 6c — Format + +Print the suggestion after a horizontal rule, below the local commits section: + +``` +--- +🧭 <suggestion text> +``` + +This section is omitted in milestone mode. + +--- + ## Milestone mode (Steps M1–M3) Only entered when `--milestone` or `--sprint` is detected in Step 1. @@ -176,8 +238,7 @@ Do not post, comment, write files, or take any action. Output only. ## Hard rules - Never write to GitHub (no comments, labels, issue updates, or PR changes). -- Never suggest what the developer should work on next. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it. -<!-- generated by CodeCannon/sync.sh | skill: status | adapter: gemini | hash: 4c095e8c | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> +<!-- generated by CodeCannon/sync.sh | skill: status | adapter: gemini | hash: 394d5e30 | DO NOT EDIT — run CodeCannon/sync.sh to regenerate --> diff --git a/ROADMAP.md b/ROADMAP.md index 31afaca..4aee4fd 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -4,7 +4,7 @@ Ideas and future work. Not prioritized — just captured so they don't get lost. ## Swarm mode / multi-agent workflows -The current skill set (start/submit-for-review/review/version/release) assumes **deep mode**: one issue, one branch, one coherent PR. This works well for disciplined, sequential work. +The current skill set (start/submit-for-review/review/deploy) assumes **deep mode**: one issue, one branch, one coherent PR. This works well for disciplined, sequential work. In practice, developers often run multiple agents simultaneously on unrelated tasks — "swarm mode." This resists the ticket-per-change structure because the agents share a working directory and branch. Worktrees could isolate agents, but only Claude Code supports them natively; Cursor, Codex, and Gemini don't. diff --git a/skills/deploy.md b/skills/deploy.md index 33dfb51..9f6c087 100644 --- a/skills/deploy.md +++ b/skills/deploy.md @@ -123,7 +123,7 @@ Would you like to bump the version before deploying? - **minor** → X.B.0 - **major** → A.0.0 - **specific** → enter a version number - - **skip** → proceed to release with the current tag + - **skip** → proceed to release with the latest existing tag ``` Wait for their response. @@ -132,12 +132,12 @@ Wait for their response. ## Step 3 — Version bump (if requested) -If the user chose to skip, verify a version tag exists on HEAD: +If the user chose to skip, find the latest version tag in the branch history: ```bash -git describe --exact-match --tags HEAD 2>/dev/null +git describe --tags --abbrev=0 2>/dev/null ``` -If no tag is found when skipping, warn: "No version tag found on HEAD. You must bump the version before deploying." Return to the version bump prompt. +If no tag is found at all (first release), warn: "No version tag found. You must bump the version before deploying." Return to the version bump prompt. Otherwise, use the tag found as the release version. If the user chose a bump level, map their response to a command: