@clipboard-health/ai-rules 2.36.0 → 2.37.0

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.36.0",
3
+ "version": "2.37.0",
4
4
  "description": "Pre-built AI agent rules for consistent coding standards.",
5
5
  "keywords": [
6
6
  "ai",
@@ -17,6 +17,7 @@ description: "Writing ANY TypeScript code"
17
17
 
18
18
  ## Core Rules
19
19
 
20
+ - Do not add ticket or issue numbers (e.g. Linear, Jira IDs) to code, variable names, or comments unless explicitly asked
20
21
  - Avoid type assertions (`as`, `!`) unless absolutely necessary
21
22
  - Use `function` keyword for declarations, not `const`
22
23
  - Prefer `undefined` over `null`
@@ -14,6 +14,11 @@ Focus on integration tests—test how components work together as users experien
14
14
 
15
15
  Prefer user-centric queries in priority order: `getByRole`, `getByLabelText`, `getByText`; use `getByTestId` only as a last resort.
16
16
 
17
+ ## Visibility Assertions
18
+
19
+ - Use `toBeVisible()` to assert an element is visible in the DOM (rendered and not hidden)
20
+ - Use `not.toBeInTheDocument()` to assert an element does not exist in the DOM — do not use `not.toBeVisible()` for this case, as it passes even when the element is present but hidden
21
+
17
22
  ## MSW Handlers
18
23
 
19
24
  Export factory functions, not static handlers:
@@ -7,6 +7,7 @@ argument-hint: "[--draft]"
7
7
  ## Setup
8
8
 
9
9
  - If `gh auth status` fails, stop and tell the user.
10
+ - If `git fetch` or `git push` fails with public key or agent errors, retry the same operation with `git -c credential.helper='!gh auth git-credential'` while preserving the original remote and branch mapping. For `git fetch`, keep the configured remote (e.g., `git -c credential.helper='!gh auth git-credential' fetch origin <same arguments>`) so `origin/*` refs update; for `git push`, use the same destination and branch mapping, substituting `https://github.com/<org>/<repo>.git` only when the configured remote URL is SSH.
10
11
  - If `git rev-parse --verify origin/HEAD` fails, `origin/HEAD` is unset. Stop and tell the user to run `git remote set-head origin -a`.
11
12
  - If `git status --short`, `git log --oneline origin/HEAD..HEAD`, and `gh pr view --json url --jq .url 2>/dev/null` are all empty, stop and reply "nothing to ship."
12
13