@clipboard-health/ai-rules 2.15.1 → 2.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/ai-rules",
3
- "version": "2.15.1",
3
+ "version": "2.15.2",
4
4
  "description": "Pre-built AI agent rules for consistent coding standards.",
5
5
  "keywords": [
6
6
  "ai",
@@ -7,11 +7,19 @@ description: Commit, push, and open a PR. Use when the user wants to ship change
7
7
 
8
8
  - Current branch: !`git branch --show-current`
9
9
  - Git status: !`git status --short`
10
+ - Commits ahead of default branch: !`git log --oneline origin/HEAD..HEAD 2>/dev/null || echo "(unknown)"`
11
+ - Existing PR: !`gh pr view --json url --jq .url 2>/dev/null || echo "none"`
10
12
  - Diff summary: !`git diff HEAD --stat`
11
13
  - Full diff: !`git diff HEAD`
12
14
 
13
15
  ## Your task
14
16
 
17
+ **First, decide from the context above. If `Commits ahead of default branch` is `(unknown)`, skip this decision and use the full flow below.**
18
+
19
+ - If `Git status` is empty AND `Commits ahead of default branch` is empty AND `Existing PR` is `none`: stop. Reply with `nothing to ship.` and do nothing else.
20
+ - If `Git status` is empty but there are `Commits ahead of default branch` or an `Existing PR`: skip step 2 only (no changes to commit). Still run step 1 — its "if on main" check needs to fire so local commits on main are moved to a new branch rather than pushed directly to main. Then continue with step 3 and step 4.
21
+ - Otherwise: proceed with all steps below.
22
+
15
23
  Based on the above changes:
16
24
 
17
25
  1. Create a new branch if on main (e.g., `feat/add-user-validation`, `fix/null-check-in-parser`)